Commit a35aa237 authored by Simon Knox's avatar Simon Knox Committed by Clement Ho

Resolve "EE-only js for project edit page"

parent a09b4eaf
...@@ -336,7 +336,7 @@ var Dispatcher; ...@@ -336,7 +336,7 @@ var Dispatcher;
// ee-end // ee-end
break; break;
case 'projects:edit': case 'projects:edit':
import('./pages/projects/edit') import(/* webpackChunkName: "ee_projects_edit" */ 'ee/pages/projects/edit')
.then(callDefault) .then(callDefault)
.catch(fail); .catch(fail);
break; break;
......
/* eslint-disable no-new */ /* eslint-disable no-new */
import UsersSelect from '~/users_select';
import UserCallout from '~/user_callout';
import groupsSelect from '~/groups_select';
import initSettingsPanels from '~/settings_panels'; import initSettingsPanels from '~/settings_panels';
import setupProjectEdit from '~/project_edit'; import setupProjectEdit from '~/project_edit';
import ProjectNew from '../shared/project_new'; import ProjectNew from '../shared/project_new';
import projectAvatar from '../shared/project_avatar'; import projectAvatar from '../shared/project_avatar';
import initProjectPermissionsSettings from '../shared/permissions'; import initProjectPermissionsSettings from '../shared/permissions';
// EE imports
import ApproversSelect from 'ee/approvers_select'; // eslint-disable-line import/first
export default () => { export default () => {
new ProjectNew(); // eslint-disable-line no-new new ProjectNew(); // eslint-disable-line no-new
new UsersSelect();
groupsSelect();
setupProjectEdit(); setupProjectEdit();
// Initialize expandable settings panels // Initialize expandable settings panels
initSettingsPanels(); initSettingsPanels();
projectAvatar(); projectAvatar();
initProjectPermissionsSettings(); initProjectPermissionsSettings();
new UserCallout({ className: 'js-service-desk-callout' });
new UserCallout({ className: 'js-mr-approval-callout' });
// EE imports
new ApproversSelect(); // eslint-disable-line no-new
}; };
/* eslint-disable no-new */
import initCePage from '~/pages/projects/edit';
import UsersSelect from '~/users_select';
import UserCallout from '~/user_callout';
import groupsSelect from '~/groups_select';
import ApproversSelect from 'ee/approvers_select';
export default () => {
new UsersSelect();
groupsSelect();
initCePage();
new UserCallout({ className: 'js-service-desk-callout' });
new UserCallout({ className: 'js-mr-approval-callout' });
new ApproversSelect();
};
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