提交 d08610c3 编写于 作者: J Jacob Schatz

Refactor projects:l*

上级 0a51eae5
......@@ -483,11 +483,21 @@ import Activities from './activities';
case 'groups:labels:new':
case 'groups:labels:edit':
case 'projects:labels:new':
import('./pages/projects/labels/new')
.then(callDefault)
.catch(fail);
break;
case 'projects:labels:edit':
new Labels();
import('./pages/projects/labels/new')
.then(callDefault)
.catch(fail);
break;
case 'groups:labels:index':
case 'projects:labels:index':
import('./pages/projects/labels/index')
.then(callDefault)
.catch(fail);
break;
case 'groups:labels:index':
if ($('.prioritized-labels').length) {
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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册