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:
authorConstance Okoghenun <constanceokoghenun@gmail.com>2019-01-07 16:41:51 +0300
committerConstance Okoghenun <constanceokoghenun@gmail.com>2019-01-07 16:41:51 +0300
commit172ef22b6e748b3c2638317de0a0b7d974ae6c2f (patch)
treebd0aaccb9cffd0ed11d4f1f9223299b2a9a8c62a
parent64fcda29f6ed95aa2664f4478b4dc487c3c63459 (diff)
Cancel button for diff notes
Added "cancel" comment button for inline diff notes for commits
-rw-r--r--app/assets/javascripts/notes.js4
-rw-r--r--app/views/shared/notes/_form.html.haml3
2 files changed, 7 insertions, 0 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index 019e1083271..c3443c300e3 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -982,6 +982,10 @@ export default class Notes {
// DiffNote
form.find('#note_position').val(dataHolder.attr('data-position'));
+ form
+ .find('.js-close-discussion-note-form')
+ .show()
+ .removeClass('hide');
form.find('.js-note-target-close').remove();
form.find('.js-note-new-discussion').remove();
this.setupNoteForm(form);
diff --git a/app/views/shared/notes/_form.html.haml b/app/views/shared/notes/_form.html.haml
index d3f1a9c9704..493c6241257 100644
--- a/app/views/shared/notes/_form.html.haml
+++ b/app/views/shared/notes/_form.html.haml
@@ -39,3 +39,6 @@
= render partial: 'shared/notes/comment_button'
= yield(:note_actions)
+
+ %a.btn.btn-cancel.js-close-discussion-note-form.hide{ role: "button", data: {cancel_text: "Cancel" } }
+ Cancel