Commit f7160499 authored by Clement Ho's avatar Clement Ho

Code improvements

parent d08610c3
......@@ -482,13 +482,15 @@ import Activities from './activities';
break;
case 'groups:labels:new':
case 'groups:labels:edit':
new Labels();
break;
case 'projects:labels:new':
import('./pages/projects/labels/new')
.then(callDefault)
.catch(fail);
break;
case 'projects:labels:edit':
import('./pages/projects/labels/new')
import('./pages/projects/labels/edit')
.then(callDefault)
.catch(fail);
break;
......
import Labels from '~/labels';
export default function () {
new Labels(); // eslint-disable-line no-new
}
export default () => new Labels();
/* 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();
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);
new GroupLabelSubscription($el); // eslint-disable-line no-new
} else {
new ProjectLabelSubscription($el);
new ProjectLabelSubscription($el); // eslint-disable-line no-new
}
});
};
import Labels from '~/labels';
export default function () {
new Labels(); // eslint-disable-line no-new
}
export default () => new Labels();
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