mirror of
https://github.com/redmine/redmine.git
synced 2026-07-12 16:21:39 +02:00
Improve visibility of error message during file upload (#43381).
Patch by Kenta Kumojima (user:kumojima). git-svn-id: https://svn.redmine.org/redmine/trunk@24439 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -73,14 +73,16 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) {
|
||||
addInlineAttachmentMarkup(file);
|
||||
progressSpan.progressbar( 'value', 100 ).remove();
|
||||
fileSpan.find('input.description, a').css('display', 'inline-flex');
|
||||
updateSVGIcon(attachmentIcon[0], 'file');
|
||||
})
|
||||
.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], 'file');
|
||||
var form = fileSpan.parents('form');
|
||||
if (form.queue('upload').length == 0 && ajaxUpload.uploading == 0) {
|
||||
$('input:submit', form).removeAttr('disabled');
|
||||
|
||||
Reference in New Issue
Block a user