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