Commit 80eb68e0 authored by Jacob Schatz's avatar Jacob Schatz

Refactor dispatcher for snippets:*

parent ec94d906
...@@ -307,11 +307,24 @@ import Activities from './activities'; ...@@ -307,11 +307,24 @@ import Activities from './activities';
new ZenMode(); new ZenMode();
break; break;
case 'snippets:new': case 'snippets:new':
import('./pages/snippets/new')
.then(callDefault)
.catch(fail);
break;
case 'snippets:edit': case 'snippets:edit':
import('./pages/snippets/edit')
.then(callDefault)
.catch(fail);
break;
case 'snippets:create': case 'snippets:create':
import('./pages/snippets/create')
.then(callDefault)
.catch(fail);
break;
case 'snippets:update': case 'snippets:update':
new GLForm($('.snippet-form'), false); import('./pages/snippets/update')
new ZenMode(); .then(callDefault)
.catch(fail);
break; break;
case 'projects:releases:edit': case 'projects:releases:edit':
new ZenMode(); new ZenMode();
...@@ -562,7 +575,7 @@ import Activities from './activities'; ...@@ -562,7 +575,7 @@ import Activities from './activities';
import('./pages/admin/conversational_development_index/show').then(m => m.default()).catch(fail); import('./pages/admin/conversational_development_index/show').then(m => m.default()).catch(fail);
break; break;
case 'snippets:show': case 'snippets:show':
import('./pages/snippets/show').then(m => m.default()).catch(fail); import('./pages/snippets/show').then(callDefault).catch(fail);
break; break;
case 'import:fogbugz:new_user_map': case 'import:fogbugz:new_user_map':
import('./pages/import/fogbugz/new_user_map').then(m => m.default()).catch(fail); import('./pages/import/fogbugz/new_user_map').then(m => m.default()).catch(fail);
......
import GLForm from '~/gl_form';
import ZenMode from '~/zen_mode';
export default function () {
new GLForm($('.snippet-form'), false); // eslint-disable-line no-new
new ZenMode(); // eslint-disable-line no-new
}
import GLForm from '~/gl_form';
import ZenMode from '~/zen_mode';
export default function () {
new GLForm($('.snippet-form'), false); // eslint-disable-line no-new
new ZenMode(); // eslint-disable-line no-new
}
import GLForm from '~/gl_form';
import ZenMode from '~/zen_mode';
export default function () {
new GLForm($('.snippet-form'), false); // eslint-disable-line no-new
new ZenMode(); // eslint-disable-line no-new
}
import GLForm from '~/gl_form';
import ZenMode from '~/zen_mode';
export default function () {
new GLForm($('.snippet-form'), false); // eslint-disable-line no-new
new ZenMode(); // 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