2018-03-09 15:18:59 -05:00
|
|
|
import $ from 'jquery';
|
2018-01-12 13:48:28 -05:00
|
|
|
import LabelManager from './label_manager';
|
|
|
|
import GroupLabelSubscription from './group_label_subscription';
|
|
|
|
import ProjectLabelSubscription from './project_label_subscription';
|
|
|
|
|
|
|
|
export default () => {
|
|
|
|
if ($('.prioritized-labels').length) {
|
|
|
|
new LabelManager(); // eslint-disable-line no-new
|
|
|
|
}
|
|
|
|
$('.label-subscription').each((i, el) => {
|
|
|
|
const $el = $(el);
|
|
|
|
|
|
|
|
if ($el.find('.dropdown-group-label').length) {
|
|
|
|
new GroupLabelSubscription($el); // eslint-disable-line no-new
|
|
|
|
} else {
|
|
|
|
new ProjectLabelSubscription($el); // eslint-disable-line no-new
|
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|