From 3b8e863feddb841ec7f724f8aec9d74b7960ef85 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sat, 13 Sep 2014 18:42:17 +0200 Subject: [PATCH] Fix wrong event selector that causes attachment uploading not working (fix #960) --- app/coffee/modules/common/attachments.coffee | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/coffee/modules/common/attachments.coffee b/app/coffee/modules/common/attachments.coffee index 7a4bf87b..06980dac 100644 --- a/app/coffee/modules/common/attachments.coffee +++ b/app/coffee/modules/common/attachments.coffee @@ -220,11 +220,7 @@ AttachmentsDirective = ($confirm) -> $ctrl.reorderAttachment(attachment, newIndex) $ctrl.saveAttachments() - $el.on "click", "a.add-attach", (event) -> - event.preventDefault() - $el.find("input.add-attach").trigger("click") - - $el.on "change", "input.add-attach", (event) -> + $el.on "change", ".attachments-header input", (event) -> files = _.toArray(event.target.files) return if files.length < 1