Commit 7a9c3264 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'dispatcher-milestones' into 'master'

Added imports for milestone dispatcher routes

See merge request gitlab-org/gitlab-ce!16387
parents 0504f37d 913a430e
......@@ -54,7 +54,6 @@ import ShortcutsIssuable from './shortcuts_issuable';
import U2FAuthenticate from './u2f/authenticate';
import Members from './members';
import memberExpirationDate from './member_expiration_date';
import DueDateSelectors from './due_date_select';
import Diff from './diff';
import ProjectLabelSubscription from './project_label_subscription';
import SearchAutocomplete from './search_autocomplete';
......@@ -185,18 +184,28 @@ import { fetchCommitMergeRequests } from './commit_merge_requests';
.catch(fail);
break;
case 'projects:milestones:new':
case 'projects:milestones:create':
import('./pages/projects/milestones/new')
.then(callDefault)
.catch(fail);
break;
case 'projects:milestones:edit':
case 'projects:milestones:update':
new ZenMode();
new DueDateSelectors();
new GLForm($('.milestone-form'), true);
import('./pages/projects/milestones/edit')
.then(callDefault)
.catch(fail);
break;
case 'groups:milestones:new':
case 'groups:milestones:create':
import('./pages/groups/milestones/new')
.then(callDefault)
.catch(fail);
break;
case 'groups:milestones:edit':
case 'groups:milestones:update':
new ZenMode();
new DueDateSelectors();
new GLForm($('.milestone-form'), false);
import('./pages/groups/milestones/edit')
.then(callDefault)
.catch(fail);
break;
case 'projects:compare:show':
new Diff();
......
import initForm from '../../../../shared/milestones/form';
export default () => initForm(false);
import initForm from '../../../../shared/milestones/form';
export default () => initForm(false);
import initForm from '../../../../shared/milestones/form';
export default () => initForm();
import initForm from '../../../../shared/milestones/form';
export default () => initForm();
import ZenMode from '../../zen_mode';
import DueDateSelectors from '../../due_date_select';
import GLForm from '../../gl_form';
export default (initGFM = true) => {
new ZenMode(); // eslint-disable-line no-new
new DueDateSelectors(); // eslint-disable-line no-new
new GLForm($('.milestone-form'), initGFM); // 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