Feature #43381 » improve_error_display_on_file_upload.patch
| app/assets/javascripts/attachments.js | ||
|---|---|---|
|
addInlineAttachmentMarkup(file);
|
||
|
progressSpan.progressbar( 'value', 100 ).remove();
|
||
|
fileSpan.find('input.description, a').css('display', 'inline-flex');
|
||
|
updateSVGIcon(attachmentIcon[0], 'attachment');
|
||
|
})
|
||
|
.fail(function(result) {
|
||
|
progressSpan.text(result.statusText);
|
||
|
$('<span>').insertAfter(progressSpan).text(result.statusText);
|
||
|
progressSpan.remove();
|
||
|
updateSVGIcon(attachmentIcon[0], 'warning');
|
||
|
}).always(function() {
|
||
|
ajaxUpload.uploading--;
|
||
|
fileSpan.removeClass('ajax-loading');
|
||
|
attachmentIcon.removeClass('svg-loader');
|
||
|
updateSVGIcon(attachmentIcon[0], 'attachment');
|
||
|
var form = fileSpan.parents('form');
|
||
|
if (form.queue('upload').length == 0 && ajaxUpload.uploading == 0) {
|
||
|
$('input:submit', form).removeAttr('disabled');
|
||