BigW Consortium Gitlab

Commit d08610c3 by Jacob Schatz

Refactor projects:l*

parent 0a51eae5
...@@ -483,11 +483,21 @@ import Activities from './activities'; ...@@ -483,11 +483,21 @@ import Activities from './activities';
case 'groups:labels:new': case 'groups:labels:new':
case 'groups:labels:edit': case 'groups:labels:edit':
case 'projects:labels:new': case 'projects:labels:new':
import('./pages/projects/labels/new')
.then(callDefault)
.catch(fail);
break;
case 'projects:labels:edit': case 'projects:labels:edit':
new Labels(); import('./pages/projects/labels/new')
.then(callDefault)
.catch(fail);
break; break;
case 'groups:labels:index':
case 'projects:labels:index': case 'projects:labels:index':
import('./pages/projects/labels/index')
.then(callDefault)
.catch(fail);
break;
case 'groups:labels:index':
if ($('.prioritized-labels').length) { if ($('.prioritized-labels').length) {
new LabelManager(); new LabelManager();
} }
......
import Labels from '~/labels';
export default function () {
new Labels(); // eslint-disable-line no-new
}
/* eslint-disable no-new */
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();
}
$('.label-subscription').each((i, el) => {
const $el = $(el);
if ($el.find('.dropdown-group-label').length) {
new GroupLabelSubscription($el);
} else {
new ProjectLabelSubscription($el);
}
});
};
import Labels from '~/labels';
export default function () {
new Labels(); // eslint-disable-line no-new
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment