2016-09-12 13:19:02 -04:00
|
|
|
((global) => {
|
2016-09-19 10:38:31 -04:00
|
|
|
class BlobLicenseSelectors {
|
2016-09-12 13:19:02 -04:00
|
|
|
constructor({ $dropdowns, editor }) {
|
|
|
|
this.$dropdowns = $('.js-license-selector');
|
|
|
|
this.editor = editor;
|
2016-09-28 10:58:36 -04:00
|
|
|
this.$dropdowns.each((i, dropdown) => {
|
2016-09-12 13:19:02 -04:00
|
|
|
const $dropdown = $(dropdown);
|
|
|
|
return new BlobLicenseSelector({
|
|
|
|
editor,
|
|
|
|
pattern: /^(.+\/)?(licen[sc]e|copying)($|\.)/i,
|
|
|
|
data: $dropdown.data('data'),
|
|
|
|
wrapper: $dropdown.closest('.js-license-selector-wrap'),
|
|
|
|
dropdown: $dropdown,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
global.BlobLicenseSelectors = BlobLicenseSelectors;
|
|
|
|
|
|
|
|
})(window.gl || (window.gl = {}));
|