Patch #43381 » improve_error_display_on_file_upload.patch
| app/assets/javascripts/attachments.js | ||
|---|---|---|
| 73 | 73 |
addInlineAttachmentMarkup(file); |
| 74 | 74 |
progressSpan.progressbar( 'value', 100 ).remove(); |
| 75 | 75 |
fileSpan.find('input.description, a').css('display', 'inline-flex');
|
| 76 |
updateSVGIcon(attachmentIcon[0], 'attachment'); |
|
| 76 | 77 |
}) |
| 77 | 78 |
.fail(function(result) {
|
| 78 |
progressSpan.text(result.statusText); |
|
| 79 |
$('<span>').insertAfter(progressSpan).text(result.statusText);
|
|
| 80 |
progressSpan.remove(); |
|
| 81 |
updateSVGIcon(attachmentIcon[0], 'warning'); |
|
| 79 | 82 |
}).always(function() {
|
| 80 | 83 |
ajaxUpload.uploading--; |
| 81 | 84 |
fileSpan.removeClass('ajax-loading');
|
| 82 | 85 |
attachmentIcon.removeClass('svg-loader');
|
| 83 |
updateSVGIcon(attachmentIcon[0], 'attachment'); |
|
| 84 | 86 |
var form = fileSpan.parents('form');
|
| 85 | 87 |
if (form.queue('upload').length == 0 && ajaxUpload.uploading == 0) {
|
| 86 | 88 |
$('input:submit', form).removeAttr('disabled');
|
- « Previous
- 1
- 2
- 3
- Next »