From 24fa3461e1acbd3f0b1cd6cc11566a2571b16de0 Mon Sep 17 00:00:00 2001 From: Constance Okoghenun Date: Mon, 15 Jan 2018 07:33:20 +0100 Subject: Refactored import of projects:tags:* and projects:tree:* of dispatcher.js --- app/assets/javascripts/pages/projects/tags/new/index.js | 9 +++++++++ app/assets/javascripts/pages/projects/tree/show/index.js | 16 ++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 app/assets/javascripts/pages/projects/tags/new/index.js create mode 100644 app/assets/javascripts/pages/projects/tree/show/index.js (limited to 'app/assets/javascripts/pages') 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 +}; + -- cgit v1.2.1