diff options
-rw-r--r-- | app/assets/javascripts/dispatcher.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/pages/snippets/edit/index.js | 8 | ||||
-rw-r--r-- | app/assets/javascripts/pages/snippets/form.js (renamed from app/assets/javascripts/pages/snippets/create/index.js) | 0 | ||||
-rw-r--r-- | app/assets/javascripts/pages/snippets/new/index.js | 8 | ||||
-rw-r--r-- | app/assets/javascripts/pages/snippets/update/index.js | 7 |
5 files changed, 6 insertions, 21 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index 38fbc9ce4e0..ecd34372c4a 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -310,12 +310,12 @@ import Activities from './activities'; .catch(fail); break; case 'snippets:create': - import('./pages/snippets/create') + import('./pages/snippets/new') .then(callDefault) .catch(fail); break; case 'snippets:update': - import('./pages/snippets/update') + import('./pages/snippets/edit') .then(callDefault) .catch(fail); break; diff --git a/app/assets/javascripts/pages/snippets/edit/index.js b/app/assets/javascripts/pages/snippets/edit/index.js index f996d3cd74e..9c664b5f1ff 100644 --- a/app/assets/javascripts/pages/snippets/edit/index.js +++ b/app/assets/javascripts/pages/snippets/edit/index.js @@ -1,7 +1,3 @@ -import GLForm from '~/gl_form'; -import ZenMode from '~/zen_mode'; +import form from '../form'; -export default () => { - new GLForm($('.snippet-form'), false); // eslint-disable-line no-new - new ZenMode(); // eslint-disable-line no-new -}; +export default form; diff --git a/app/assets/javascripts/pages/snippets/create/index.js b/app/assets/javascripts/pages/snippets/form.js index f996d3cd74e..f996d3cd74e 100644 --- a/app/assets/javascripts/pages/snippets/create/index.js +++ b/app/assets/javascripts/pages/snippets/form.js diff --git a/app/assets/javascripts/pages/snippets/new/index.js b/app/assets/javascripts/pages/snippets/new/index.js index f996d3cd74e..9c664b5f1ff 100644 --- a/app/assets/javascripts/pages/snippets/new/index.js +++ b/app/assets/javascripts/pages/snippets/new/index.js @@ -1,7 +1,3 @@ -import GLForm from '~/gl_form'; -import ZenMode from '~/zen_mode'; +import form from '../form'; -export default () => { - new GLForm($('.snippet-form'), false); // eslint-disable-line no-new - new ZenMode(); // eslint-disable-line no-new -}; +export default form; diff --git a/app/assets/javascripts/pages/snippets/update/index.js b/app/assets/javascripts/pages/snippets/update/index.js deleted file mode 100644 index f996d3cd74e..00000000000 --- a/app/assets/javascripts/pages/snippets/update/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import GLForm from '~/gl_form'; -import ZenMode from '~/zen_mode'; - -export default () => { - new GLForm($('.snippet-form'), false); // eslint-disable-line no-new - new ZenMode(); // eslint-disable-line no-new -}; |