Commit c0dfd967 authored by Clement Ho's avatar Clement Ho

Code improvements

parent 0a25cdd7
...@@ -346,6 +346,7 @@ import Activities from './activities'; ...@@ -346,6 +346,7 @@ import Activities from './activities';
import('./pages/projects/show') import('./pages/projects/show')
.then(callDefault) .then(callDefault)
.catch(fail); .catch(fail);
shortcut_handler = true;
break; break;
case 'projects:edit': case 'projects:edit':
import('./pages/projects/edit') import('./pages/projects/edit')
......
import ZenMode from '~/zen_mode'; import ZenMode from '~/zen_mode';
import GLForm from '~/gl_form'; import GLForm from '~/gl_form';
export default function () { export default function ($formEl) {
new ZenMode(); // eslint-disable-line no-new new ZenMode(); // eslint-disable-line no-new
new GLForm($('.release-form'), true); // eslint-disable-line no-new new GLForm($formEl, true); // eslint-disable-line no-new
} }
import initForm from '~/pages/projects/init_form';
export default initForm($('.release-form'));
import initSettingsPanels from '~/settings_panels'; import initSettingsPanels from '~/settings_panels';
export default function () { export default initSettingsPanels;
// Initialize expandable settings panels
initSettingsPanels();
}
...@@ -6,7 +6,7 @@ import BlobViewer from '~/blob/viewer/index'; ...@@ -6,7 +6,7 @@ import BlobViewer from '~/blob/viewer/index';
import Activities from '~/activities'; import Activities from '~/activities';
import { ajaxGet } from '~/lib/utils/common_utils'; import { ajaxGet } from '~/lib/utils/common_utils';
export default function () { export default () => {
new ShortcutsNavigation(); // eslint-disable-line no-new new ShortcutsNavigation(); // eslint-disable-line no-new
new NotificationsForm(); // eslint-disable-line no-new new NotificationsForm(); // eslint-disable-line no-new
new UserCallout({ // eslint-disable-line no-new new UserCallout({ // eslint-disable-line no-new
......
import GLForm from '~/gl_form'; import initForm from '~/pages/projects/init_form';
import ZenMode from '~/zen_mode';
export default function () { export default initForm($('.snippet-form'));
new GLForm($('.snippet-form'), true); // eslint-disable-line no-new
new ZenMode(); // eslint-disable-line no-new
}
import GLForm from '~/gl_form'; import initForm from '~/pages/projects/init_form';
import ZenMode from '~/zen_mode';
export default function () { export default initForm($('.snippet-form'));
new GLForm($('.snippet-form'), true); // eslint-disable-line no-new
new ZenMode(); // eslint-disable-line no-new
}
import GLForm from '~/gl_form'; import initSnippets from '~/pages/projects/snippets/init_snippets';
import ZenMode from '~/zen_mode';
export default function () { export default initSnippets;
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