Commit 29e7647a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'close_button_after_added_comment' into 'master'

Close button after added comment

Fixes #1549

See merge request !1070
parents 60ea455d dac5e6de
......@@ -26,6 +26,7 @@ class Notes
# Reopen and close actions for Issue/MR combined with note form submit
$(document).on "click", ".js-note-target-reopen", @targetReopen
$(document).on "click", ".js-note-target-close", @targetClose
$(document).on "click", ".js-comment-button", @updateCloseButton
$(document).on "keyup", ".js-note-text", @updateTargetButtons
# remove a note (in general)
......@@ -496,6 +497,11 @@ class Notes
if noteText.trim().length > 0
form.submit()
updateCloseButton: (e) =>
textarea = $(e.target)
form = textarea.parents('form')
form.find('.js-note-target-close').text('Close')
updateTargetButtons: (e) =>
textarea = $(e.target)
form = textarea.parents('form')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment