From 782500158608eba36e27f53e1d8822d25710fe80 Mon Sep 17 00:00:00 2001 From: Daniel Gerhardt Date: Fri, 10 Jul 2015 16:41:43 +0200 Subject: 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. --- app/assets/javascripts/notes.js.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/assets/javascripts/notes.js.coffee') 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 -- cgit v1.2.1 From dfe7807653304f2a42369141925733f3c6515488 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sun, 26 Jul 2015 09:52:49 -0700 Subject: Fix live notes refresh in relative URL deployments --- app/assets/javascripts/notes.js.coffee | 1 - 1 file changed, 1 deletion(-) (limited to 'app/assets/javascripts/notes.js.coffee') diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee index bcff7bcc49e..0021d17d85e 100644 --- a/app/assets/javascripts/notes.js.coffee +++ b/app/assets/javascripts/notes.js.coffee @@ -10,7 +10,6 @@ class @Notes constructor: (notes_url, note_ids, last_fetched_at, view) -> @notes_url = notes_url - @notes_url = gon.relative_url_root + @notes_url if gon.relative_url_root? @note_ids = note_ids @last_fetched_at = last_fetched_at @view = view -- cgit v1.2.1