diff options
author | Simon Knox <psimyn@gmail.com> | 2018-01-15 21:13:07 +1100 |
---|---|---|
committer | Simon Knox <psimyn@gmail.com> | 2018-01-15 21:13:07 +1100 |
commit | e2f82f4a45af7116cd8cf9630ce026ec79216799 (patch) | |
tree | 239248a67487e5d90620a429e11e1a34902dab9c | |
parent | 78c962e303b16522651673bf6420500dbc87d452 (diff) | |
download | gitlab-ce-e2f82f4a45af7116cd8cf9630ce026ec79216799.tar.gz |
dedupe
3 files changed, 20 insertions, 26 deletions
diff --git a/app/assets/javascripts/pages/projects/issues/edit/index.js b/app/assets/javascripts/pages/projects/issues/edit/index.js index 5c7daf84738..7f27f379d8c 100644 --- a/app/assets/javascripts/pages/projects/issues/edit/index.js +++ b/app/assets/javascripts/pages/projects/issues/edit/index.js @@ -1,16 +1,5 @@ -/* eslint-disable no-new */ -import GLForm from '~/gl_form'; -import IssuableForm from '~/issuable_form'; -import LabelsSelect from '~/labels_select'; -import MilestoneSelect from '~/milestone_select'; -import ShortcutsNavigation from '~/shortcuts_navigation'; -import IssuableTemplateSelectors from '~/templates/issuable_template_selectors'; +import initForm from '../form'; export default () => { - new ShortcutsNavigation(); - new GLForm($('.issue-form'), true); - new IssuableForm($('.issue-form')); - new LabelsSelect(); - new MilestoneSelect(); - new IssuableTemplateSelectors(); + initForm(); }; diff --git a/app/assets/javascripts/pages/projects/issues/form.js b/app/assets/javascripts/pages/projects/issues/form.js new file mode 100644 index 00000000000..5c7daf84738 --- /dev/null +++ b/app/assets/javascripts/pages/projects/issues/form.js @@ -0,0 +1,16 @@ +/* eslint-disable no-new */ +import GLForm from '~/gl_form'; +import IssuableForm from '~/issuable_form'; +import LabelsSelect from '~/labels_select'; +import MilestoneSelect from '~/milestone_select'; +import ShortcutsNavigation from '~/shortcuts_navigation'; +import IssuableTemplateSelectors from '~/templates/issuable_template_selectors'; + +export default () => { + new ShortcutsNavigation(); + new GLForm($('.issue-form'), true); + new IssuableForm($('.issue-form')); + new LabelsSelect(); + new MilestoneSelect(); + new IssuableTemplateSelectors(); +}; diff --git a/app/assets/javascripts/pages/projects/issues/new/index.js b/app/assets/javascripts/pages/projects/issues/new/index.js index 5c7daf84738..7f27f379d8c 100644 --- a/app/assets/javascripts/pages/projects/issues/new/index.js +++ b/app/assets/javascripts/pages/projects/issues/new/index.js @@ -1,16 +1,5 @@ -/* eslint-disable no-new */ -import GLForm from '~/gl_form'; -import IssuableForm from '~/issuable_form'; -import LabelsSelect from '~/labels_select'; -import MilestoneSelect from '~/milestone_select'; -import ShortcutsNavigation from '~/shortcuts_navigation'; -import IssuableTemplateSelectors from '~/templates/issuable_template_selectors'; +import initForm from '../form'; export default () => { - new ShortcutsNavigation(); - new GLForm($('.issue-form'), true); - new IssuableForm($('.issue-form')); - new LabelsSelect(); - new MilestoneSelect(); - new IssuableTemplateSelectors(); + initForm(); }; |