Fix wrong event selector that causes attachment uploading not working (fix #960)

stable
Andrey Antukh 2014-09-13 18:42:17 +02:00
parent 8fa3c78e6a
commit 3b8e863fed
1 changed files with 1 additions and 5 deletions

View File

@ -220,11 +220,7 @@ AttachmentsDirective = ($confirm) ->
$ctrl.reorderAttachment(attachment, newIndex) $ctrl.reorderAttachment(attachment, newIndex)
$ctrl.saveAttachments() $ctrl.saveAttachments()
$el.on "click", "a.add-attach", (event) -> $el.on "change", ".attachments-header input", (event) ->
event.preventDefault()
$el.find("input.add-attach").trigger("click")
$el.on "change", "input.add-attach", (event) ->
files = _.toArray(event.target.files) files = _.toArray(event.target.files)
return if files.length < 1 return if files.length < 1