diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-01 14:03:10 +0300 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-01 14:03:10 +0300 |
| commit | 20dbc2a1397c68b1f601872f6b0d368c95c5084e (patch) | |
| tree | 00a9b5d2cd00458c85e205819ff037b8723821b7 /app/assets/javascripts/notes.js.coffee | |
| parent | a28fe934d6d50699c564632803f44cb3120d0978 (diff) | |
| parent | 010ba5ec2219d346c8e257f3f87b22b43c5959aa (diff) | |
| download | gitlab-ce-20dbc2a1397c68b1f601872f6b0d368c95c5084e.tar.gz | |
Merge pull request #7425 from Razer6/remove_dup_javascript
Remove duplicated setupNoteForm method
Diffstat (limited to 'app/assets/javascripts/notes.js.coffee')
| -rw-r--r-- | app/assets/javascripts/notes.js.coffee | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee index 83b1bae0ea1..199cf1eed67 100644 --- a/app/assets/javascripts/notes.js.coffee +++ b/app/assets/javascripts/notes.js.coffee @@ -407,30 +407,6 @@ class Notes form.addClass "js-discussion-note-form" ### - General note form setup. - - deactivates the submit button when text is empty - hides the preview button when text is empty - setup GFM auto complete - show the form - ### - setupNoteForm: (form) => - disableButtonIfEmptyField form.find(".js-note-text"), form.find(".js-comment-button") - form.removeClass "js-new-note-form" - form.removeClass "js-new-note-form" - GitLab.GfmAutoComplete.setup() - - # setup preview buttons - previewButton = form.find(".js-note-preview-button") - form.find(".js-note-text").on "input", -> - if $(this).val().trim() isnt "" - previewButton.removeClass("turn-off").addClass "turn-on" - else - previewButton.removeClass("turn-on").addClass "turn-off" - - form.show() - - ### Called when clicking on the "add a comment" button on the side of a diff line. Inserts a temporary row for the form below the line. |
