diff options
-rw-r--r-- | public/javascripts/attachments.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index dbba6543c..0d2eedc86 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -4,7 +4,7 @@ function addFile(inputEl, file, eagerUpload) { var attachmentsFields = $(inputEl).closest('.attachments_form').find('.attachments_fields'); var addAttachment = $(inputEl).closest('.attachments_form').find('.add_attachment'); - var maxFiles = ($(inputEl).prop('multiple') == true ? 10 : 1); + var maxFiles = ($(inputEl).attr('multiple') == 'multiple' ? 10 : 1); if (attachmentsFields.children().length < maxFiles) { var attachmentId = addFile.nextAttachmentId++; @@ -89,6 +89,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) { ajaxUpload.uploading = 0; function removeFile() { + $(this).closest('.attachments_form').find('.add_attachment').show(); $(this).parent('span').remove(); return false; } |