diff options
-rw-r--r-- | app/assets/javascripts/notes.js.coffee | 4 | ||||
-rw-r--r-- | app/views/projects/notes/_note.html.haml | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee index 607b109dc0b..83b1bae0ea1 100644 --- a/app/assets/javascripts/notes.js.coffee +++ b/app/assets/javascripts/notes.js.coffee @@ -321,7 +321,9 @@ class Notes GitLab.GfmAutoComplete.setup() form = note.find(".note-edit-form") form.show() - form.find("textarea").focus() + textarea = form.find("textarea") + textarea.focus() + disableButtonIfEmptyField textarea, form.find(".js-comment-button") ### Called in response to clicking the edit note link diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml index 2fd8cb6d489..5e84aed0cc4 100644 --- a/app/views/projects/notes/_note.html.haml +++ b/app/views/projects/notes/_note.html.haml @@ -38,10 +38,10 @@ = f.text_area :note, class: 'note_text js-note-text js-gfm-input turn-on' .form-actions.clearfix - = f.submit 'Save changes', class: "btn btn-primary btn-save" + = f.submit 'Save changes', class: "btn btn-primary btn-save js-comment-button" .note-form-option - %a.choose-btn.btn.btn-small.js-choose-note-attachment-button + %a.choose-btn.btn.js-choose-note-attachment-button %i.icon-paper-clip %span Choose File ... |