diff options
author | Constance Okoghenun <cokoghenun@gitlab.com> | 2018-01-15 07:33:20 +0100 |
---|---|---|
committer | Constance Okoghenun <cokoghenun@gitlab.com> | 2018-01-15 07:33:20 +0100 |
commit | 24fa3461e1acbd3f0b1cd6cc11566a2571b16de0 (patch) | |
tree | 2e12a81a9ad13d355fbaa0894d58a76fcb10fac6 /app/assets/javascripts/pages | |
parent | 74f2f9b30fb1972a26481072486b358eb943309f (diff) | |
download | gitlab-ce-24fa3461e1acbd3f0b1cd6cc11566a2571b16de0.tar.gz |
Refactored import of projects:tags:* and projects:tree:* of dispatcher.js
Diffstat (limited to 'app/assets/javascripts/pages')
-rw-r--r-- | app/assets/javascripts/pages/projects/tags/new/index.js | 9 | ||||
-rw-r--r-- | app/assets/javascripts/pages/projects/tree/show/index.js | 16 |
2 files changed, 25 insertions, 0 deletions
diff --git a/app/assets/javascripts/pages/projects/tags/new/index.js b/app/assets/javascripts/pages/projects/tags/new/index.js new file mode 100644 index 00000000000..dacc2875c8c --- /dev/null +++ b/app/assets/javascripts/pages/projects/tags/new/index.js @@ -0,0 +1,9 @@ +import RefSelectDropdown from '../../../../ref_select_dropdown'; +import ZenMode from '../../../../zen_mode'; +import GLForm from '../../../../gl_form'; + +export default () => { + new ZenMode(); // eslint-disable-line no-new + new GLForm($('.tag-form'), true); // eslint-disable-line no-new + new RefSelectDropdown($('.js-branch-select')); // eslint-disable-line no-new +}; diff --git a/app/assets/javascripts/pages/projects/tree/show/index.js b/app/assets/javascripts/pages/projects/tree/show/index.js new file mode 100644 index 00000000000..c40866548bc --- /dev/null +++ b/app/assets/javascripts/pages/projects/tree/show/index.js @@ -0,0 +1,16 @@ +import TreeView from '../../../../tree'; +import ShortcutsNavigation from '../../../../shortcuts_navigation'; +import BlobViewer from '../../../../blob/viewer'; +import NewCommitForm from '../../../../new_commit_form'; +import { ajaxGet } from '../../../../lib/utils/common_utils'; + +export default () => { + new TreeView(); // eslint-disable-line no-new + new BlobViewer(); // eslint-disable-line no-new + new NewCommitForm($('.js-create-dir-form')); // eslint-disable-line no-new + $('#tree-slider').waitForImages(() => + ajaxGet(document.querySelector('.js-tree-content').dataset.logsPath)); + + return new ShortcutsNavigation(); // eslint-disable-line no-new +}; + |