summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-03-02 21:16:11 +0000
committerFatih Acet <acetfatih@gmail.com>2018-03-02 21:16:11 +0000
commitb342d2ae52d8f821dedd513dc80b56c99d2868f8 (patch)
tree2e32ba5d23bb5835f780f40ed629c7853ed21f3a /app/assets
parent369d34c7c8e006d2568e4a1b12b6493830811270 (diff)
downloadgitlab-ce-b342d2ae52d8f821dedd513dc80b56c99d2868f8.tar.gz
Remove mr_notes webpack bundle
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/mr_notes/index.js4
-rw-r--r--app/assets/javascripts/pages/projects/merge_requests/show/index.js6
2 files changed, 8 insertions, 2 deletions
diff --git a/app/assets/javascripts/mr_notes/index.js b/app/assets/javascripts/mr_notes/index.js
index f4cba998fa7..972fdb2b791 100644
--- a/app/assets/javascripts/mr_notes/index.js
+++ b/app/assets/javascripts/mr_notes/index.js
@@ -3,7 +3,7 @@ import notesApp from '../notes/components/notes_app.vue';
import discussionCounter from '../notes/components/discussion_counter.vue';
import store from '../notes/stores';
-document.addEventListener('DOMContentLoaded', () => {
+export default function initMrNotes() {
new Vue({ // eslint-disable-line
el: '#js-vue-mr-discussions',
components: {
@@ -38,4 +38,4 @@ document.addEventListener('DOMContentLoaded', () => {
return createElement('discussion-counter');
},
});
-});
+}
diff --git a/app/assets/javascripts/pages/projects/merge_requests/show/index.js b/app/assets/javascripts/pages/projects/merge_requests/show/index.js
index 3e72f7a6f37..e5b2827b50c 100644
--- a/app/assets/javascripts/pages/projects/merge_requests/show/index.js
+++ b/app/assets/javascripts/pages/projects/merge_requests/show/index.js
@@ -1,7 +1,13 @@
+import { hasVueMRDiscussionsCookie } from '~/lib/utils/common_utils';
+import initMrNotes from '~/mr_notes';
import initSidebarBundle from '~/sidebar/sidebar_bundle';
import initShow from '../init_merge_request_show';
document.addEventListener('DOMContentLoaded', () => {
initShow();
initSidebarBundle();
+
+ if (hasVueMRDiscussionsCookie()) {
+ initMrNotes();
+ }
});