summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gerhardt <code@dgerhardt.net>2015-07-10 16:41:43 +0200
committerDaniel Gerhardt <code@dgerhardt.net>2015-07-17 21:15:52 +0200
commit782500158608eba36e27f53e1d8822d25710fe80 (patch)
tree0a5172e1ca7e51d7e64dd2872132dae6d59d62d1
parenta84ed6eb234c9a9f0e5e5c0deea1779d224764a8 (diff)
downloadgitlab-ce-782500158608eba36e27f53e1d8822d25710fe80.tar.gz
Fix file upload dialog for comment editing
This fixes the file upload dialog which currently works for new comments but not for comment editing. The cause for this is a missing DOM class which causes traversal to the dropzone to fail. This is fixed by adding the expected `gfm-form` class to the edit form. It has to be added dynamically since adding it to the form template would break the form's layout and comment saving.
-rw-r--r--CHANGELOG1
-rw-r--r--app/assets/javascripts/notes.js.coffee2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 001d5350bad..c4877042fed 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
Please view this file on the master branch, on stable branches it's out of date.
v 7.14.0 (unreleased)
+ - Fix file upload dialog for comment editing (Daniel Gerhardt)
- Expire Rails cache entries after two weeks to prevent endless Redis growth
- Add support for destroying project milestones (Stan Hu)
diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee
index 1c05a2b9fe8..bcff7bcc49e 100644
--- a/app/assets/javascripts/notes.js.coffee
+++ b/app/assets/javascripts/notes.js.coffee
@@ -298,7 +298,7 @@ class @Notes
note.find(".note-header").hide()
base_form = note.find(".note-edit-form")
form = base_form.clone().insertAfter(base_form)
- form.addClass('current-note-edit-form')
+ form.addClass('current-note-edit-form gfm-form')
form.find('.div-dropzone').remove()
# Show the attachment delete link