diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2018-01-10 12:16:01 -0500 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2018-01-18 13:12:13 -0500 |
commit | 65fe8b08ea89519ba0dd6c05320706250b1d211d (patch) | |
tree | 22b2e50f67773a20f0e862eea9918d1f1219b3fa /app/assets/javascripts/pages/projects/snippets | |
parent | 1931b7cd9194d68609ae6694f5cb8c67519d42ae (diff) | |
download | gitlab-ce-65fe8b08ea89519ba0dd6c05320706250b1d211d.tar.gz |
Refactor for projects:s
Diffstat (limited to 'app/assets/javascripts/pages/projects/snippets')
5 files changed, 35 insertions, 0 deletions
diff --git a/app/assets/javascripts/pages/projects/snippets/create/index.js b/app/assets/javascripts/pages/projects/snippets/create/index.js new file mode 100644 index 00000000000..fac4e49c473 --- /dev/null +++ b/app/assets/javascripts/pages/projects/snippets/create/index.js @@ -0,0 +1,7 @@ +import GLForm from '~/gl_form'; +import ZenMode from '~/zen_mode'; + +export default function () { + new GLForm($('.snippet-form'), true); // eslint-disable-line no-new + new ZenMode(); // eslint-disable-line no-new +} diff --git a/app/assets/javascripts/pages/projects/snippets/edit/index.js b/app/assets/javascripts/pages/projects/snippets/edit/index.js new file mode 100644 index 00000000000..fac4e49c473 --- /dev/null +++ b/app/assets/javascripts/pages/projects/snippets/edit/index.js @@ -0,0 +1,7 @@ +import GLForm from '~/gl_form'; +import ZenMode from '~/zen_mode'; + +export default function () { + new GLForm($('.snippet-form'), true); // eslint-disable-line no-new + new ZenMode(); // eslint-disable-line no-new +} diff --git a/app/assets/javascripts/pages/projects/snippets/new/index.js b/app/assets/javascripts/pages/projects/snippets/new/index.js new file mode 100644 index 00000000000..fac4e49c473 --- /dev/null +++ b/app/assets/javascripts/pages/projects/snippets/new/index.js @@ -0,0 +1,7 @@ +import GLForm from '~/gl_form'; +import ZenMode from '~/zen_mode'; + +export default function () { + new GLForm($('.snippet-form'), true); // eslint-disable-line no-new + new ZenMode(); // eslint-disable-line no-new +} diff --git a/app/assets/javascripts/pages/projects/snippets/show/index.js b/app/assets/javascripts/pages/projects/snippets/show/index.js new file mode 100644 index 00000000000..d8cf5184f8f --- /dev/null +++ b/app/assets/javascripts/pages/projects/snippets/show/index.js @@ -0,0 +1,7 @@ +import initNotes from '~/init_notes'; +import ZenMode from '~/zen_mode'; + +export default function () { + initNotes(); + new ZenMode(); // eslint-disable-line no-new +} diff --git a/app/assets/javascripts/pages/projects/snippets/update/index.js b/app/assets/javascripts/pages/projects/snippets/update/index.js new file mode 100644 index 00000000000..fac4e49c473 --- /dev/null +++ b/app/assets/javascripts/pages/projects/snippets/update/index.js @@ -0,0 +1,7 @@ +import GLForm from '~/gl_form'; +import ZenMode from '~/zen_mode'; + +export default function () { + new GLForm($('.snippet-form'), true); // eslint-disable-line no-new + new ZenMode(); // eslint-disable-line no-new +} |