summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorSimon Knox <psimyn@gmail.com>2018-01-15 21:13:07 +1100
committerSimon Knox <psimyn@gmail.com>2018-01-15 21:13:07 +1100
commite2f82f4a45af7116cd8cf9630ce026ec79216799 (patch)
tree239248a67487e5d90620a429e11e1a34902dab9c /app/assets
parent78c962e303b16522651673bf6420500dbc87d452 (diff)
downloadgitlab-ce-e2f82f4a45af7116cd8cf9630ce026ec79216799.tar.gz
dedupe
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/pages/projects/issues/edit/index.js15
-rw-r--r--app/assets/javascripts/pages/projects/issues/form.js16
-rw-r--r--app/assets/javascripts/pages/projects/issues/new/index.js15
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();
};