From 2f48c9a83a29ac010bb375a6d2ed94167f1f66c5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 23 Oct 2016 12:20:18 +0000 Subject: Fix file upload for IE9 (#6719). git-svn-id: http://svn.redmine.org/redmine/trunk@15926 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/javascripts/attachments.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'public/javascripts') 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; } -- cgit v1.2.3