diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index fa5722723..e99f2ac7c 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -8,7 +8,7 @@ function addFile(inputEl, file, eagerUpload) { var attachmentId = addFile.nextAttachmentId++; var fileSpan = $('', { id: 'attachments_' + attachmentId }); - + fileSpan.append( $('', { type: 'text', 'class': 'filename readonly', name: 'attachments[' + attachmentId + '][filename]', readonly: 'readonly'} ).val(file.name), $('', { type: 'text', 'class': 'description', name: 'attachments[' + attachmentId + '][description]', maxlength: 255, placeholder: $(inputEl).data('description-placeholder') } ).toggle(!eagerUpload), @@ -31,7 +31,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) { function onLoadstart(e) { fileSpan.removeClass('ajax-waiting'); fileSpan.addClass('ajax-loading'); - $('input:submit', $(this).parents('form')).attr('disabled', 'disabled'); + $('input:submit', $(this).parents('form')).attr('disabled', 'disabled'); } function onProgress(e) { @@ -129,7 +129,7 @@ function addInputFiles(inputEl) { if (attachmentId) { $(inputEl).attr({ name: 'attachments[' + attachmentId + '][file]', style: 'display:none;' }).appendTo('#attachments_' + attachmentId); } - } + } clearedFileInput.insertAfter('#attachments_fields'); }