@@ -4,7 +4,7 | |||
|
4 | 4 | function addFile(inputEl, file, eagerUpload) { |
|
5 | 5 | var attachmentsFields = $(inputEl).closest('.attachments_form').find('.attachments_fields'); |
|
6 | 6 | var addAttachment = $(inputEl).closest('.attachments_form').find('.add_attachment'); |
|
7 |
var maxFiles = ($(inputEl). |
|
|
7 | var maxFiles = ($(inputEl).attr('multiple') == 'multiple' ? 10 : 1); | |
|
8 | 8 | |
|
9 | 9 | if (attachmentsFields.children().length < maxFiles) { |
|
10 | 10 | var attachmentId = addFile.nextAttachmentId++; |
@@ -89,6 +89,7 function ajaxUpload(file, attachmentId, fileSpan, inputEl) { | |||
|
89 | 89 | ajaxUpload.uploading = 0; |
|
90 | 90 | |
|
91 | 91 | function removeFile() { |
|
92 | $(this).closest('.attachments_form').find('.add_attachment').show(); | |
|
92 | 93 | $(this).parent('span').remove(); |
|
93 | 94 | return false; |
|
94 | 95 | } |
General Comments 0
You need to be logged in to leave comments.
Login now