Commit 65fe8b08 authored by Jacob Schatz's avatar Jacob Schatz

Refactor for projects:s

parent 1931b7cd
...@@ -260,15 +260,29 @@ import Activities from './activities'; ...@@ -260,15 +260,29 @@ import Activities from './activities';
.catch(fail); .catch(fail);
break; break;
case 'projects:snippets:show': case 'projects:snippets:show':
initNotes(); import('./pages/projects/snippets/show')
new ZenMode(); .then(callDefault)
.catch(fail);
break; break;
case 'projects:snippets:new': case 'projects:snippets:new':
import('./pages/projects/snippets/new')
.then(callDefault)
.catch(fail);
break;
case 'projects:snippets:edit': case 'projects:snippets:edit':
import('./pages/projects/snippets/edit')
.then(callDefault)
.catch(fail);
break;
case 'projects:snippets:create': case 'projects:snippets:create':
import('./pages/projects/snippets/create')
.then(callDefault)
.catch(fail);
break;
case 'projects:snippets:update': case 'projects:snippets:update':
new GLForm($('.snippet-form'), true); import('./pages/projects/snippets/update')
new ZenMode(); .then(callDefault)
.catch(fail);
break; break;
case 'snippets:new': case 'snippets:new':
import('./pages/snippets/new') import('./pages/snippets/new')
......
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
}
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
}
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
}
import initNotes from '~/init_notes';
import ZenMode from '~/zen_mode';
export default function () {
initNotes();
new ZenMode(); // eslint-disable-line no-new
}
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
}
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