debian-mirror-gitlab/app/assets/javascripts/init_labels.js

20 lines
614 B
JavaScript
Raw Normal View History

2018-05-09 12:01:36 +05:30
import $ from 'jquery';
2018-03-17 18:26:18 +05:30
import GroupLabelSubscription from './group_label_subscription';
2021-03-11 19:13:27 +05:30
import LabelManager from './label_manager';
2018-03-17 18:26:18 +05:30
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
}
});
};