diff options
author | Simon Knox <simon@gitlab.com> | 2018-03-01 12:41:25 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-03-01 12:41:25 +0300 |
commit | 0c9d4a16378467d75d1d7109d2b2200ed622cc25 (patch) | |
tree | 042740ad94bad0808a47de9df6fc750064adb6dc /app/assets/javascripts/pages/projects/merge_requests/init_merge_request_show.js | |
parent | 4b92ca999c48367f8855da95a1f4d46c9d152524 (diff) |
init sidebar bundle separately to allow EE override
Diffstat (limited to 'app/assets/javascripts/pages/projects/merge_requests/init_merge_request_show.js')
-rw-r--r-- | app/assets/javascripts/pages/projects/merge_requests/init_merge_request_show.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/app/assets/javascripts/pages/projects/merge_requests/init_merge_request_show.js b/app/assets/javascripts/pages/projects/merge_requests/init_merge_request_show.js new file mode 100644 index 00000000000..da27c22f537 --- /dev/null +++ b/app/assets/javascripts/pages/projects/merge_requests/init_merge_request_show.js @@ -0,0 +1,33 @@ +import MergeRequest from '~/merge_request'; +import ZenMode from '~/zen_mode'; +import initNotes from '~/init_notes'; +import initIssuableSidebar from '~/init_issuable_sidebar'; +import initDiffNotes from '~/diff_notes/diff_notes_bundle'; +import ShortcutsIssuable from '~/shortcuts_issuable'; +import Diff from '~/diff'; +import { handleLocationHash } from '~/lib/utils/common_utils'; +import howToMerge from '~/how_to_merge'; +import initPipelines from '~/commit/pipelines/pipelines_bundle'; +import initWidget from '../../../vue_merge_request_widget'; + +export default function () { + new Diff(); // eslint-disable-line no-new + new ZenMode(); // eslint-disable-line no-new + + initIssuableSidebar(); + initNotes(); + initDiffNotes(); + initPipelines(); + + const mrShowNode = document.querySelector('.merge-request'); + + window.mergeRequest = new MergeRequest({ + action: mrShowNode.dataset.mrAction, + }); + + new ShortcutsIssuable(true); // eslint-disable-line no-new + handleLocationHash(); + howToMerge(); + initWidget(); +} + |