Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2017-06-09 01:50:11 +0300
committerFatih Acet <acetfatih@gmail.com>2017-07-21 22:35:24 +0300
commitcb2287df0ad9396d1f075bde1c4f6de481d908e6 (patch)
tree04ec5bddab462523eab970483deeaa3029017538
parentf7344338985338df3d0958ef9d362b9624723e0f (diff)
Notes bundle for the issue discussions refactor.
-rw-r--r--app/assets/javascripts/notes/index.js8
-rw-r--r--app/views/projects/issues/_discussion.html.haml5
-rw-r--r--config/webpack.config.js2
3 files changed, 15 insertions, 0 deletions
diff --git a/app/assets/javascripts/notes/index.js b/app/assets/javascripts/notes/index.js
new file mode 100644
index 00000000000..4ee2cf19cf0
--- /dev/null
+++ b/app/assets/javascripts/notes/index.js
@@ -0,0 +1,8 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+
+Vue.use(Vuex);
+
+document.addEventListener('DOMContentLoaded', () => {
+ // instantiate Vue here...
+});
diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml
index 8b095f4ca10..f1711bf074e 100644
--- a/app/views/projects/issues/_discussion.html.haml
+++ b/app/views/projects/issues/_discussion.html.haml
@@ -3,5 +3,10 @@
= link_to 'Reopen issue', issue_path(@issue, issue: {state_event: :reopen}, format: 'json'), data: {original_text: "Reopen issue", alternative_text: "Comment & reopen issue"}, class: "btn btn-nr btn-reopen btn-comment js-note-target-reopen #{issue_button_visibility(@issue, false)}", title: 'Reopen issue'
= link_to 'Close issue', issue_path(@issue, issue: {state_event: :close}, format: 'json'), data: {original_text: "Close issue", alternative_text: "Comment & close issue"}, class: "btn btn-nr btn-close btn-comment js-note-target-close #{issue_button_visibility(@issue, true)}", title: 'Close issue'
+#js-notes
+ - content_for :page_specific_javascripts do
+ = webpack_bundle_tag 'common_vue'
+ = webpack_bundle_tag 'notes'
+
#notes
= render 'shared/notes/notes_with_form', :autocomplete => true
diff --git a/config/webpack.config.js b/config/webpack.config.js
index a7d92bc53b7..bcc64b1fccd 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -51,6 +51,7 @@ var config = {
monitoring: './monitoring/monitoring_bundle.js',
network: './network/network_bundle.js',
notebook_viewer: './blob/notebook_viewer.js',
+ notes: './notes/index.js',
pdf_viewer: './blob/pdf_viewer.js',
pipelines: './pipelines/pipelines_bundle.js',
pipelines_details: './pipelines/pipeline_details_bundle.js',
@@ -166,6 +167,7 @@ var config = {
'merge_conflicts',
'monitoring',
'notebook_viewer',
+ 'notes',
'pdf_viewer',
'pipelines',
'pipelines_details',