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.
This commit is contained in:
Daniel Gerhardt 2015-07-10 16:41:43 +02:00
parent a84ed6eb23
commit 7825001586
2 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
Please view this file on the master branch, on stable branches it's out of date. Please view this file on the master branch, on stable branches it's out of date.
v 7.14.0 (unreleased) 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 - Expire Rails cache entries after two weeks to prevent endless Redis growth
- Add support for destroying project milestones (Stan Hu) - Add support for destroying project milestones (Stan Hu)

View File

@ -298,7 +298,7 @@ class @Notes
note.find(".note-header").hide() note.find(".note-header").hide()
base_form = note.find(".note-edit-form") base_form = note.find(".note-edit-form")
form = base_form.clone().insertAfter(base_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() form.find('.div-dropzone').remove()
# Show the attachment delete link # Show the attachment delete link