Feature #43381 » 0002-Improve-attachment-upload-error-visibility.patch
| app/assets/javascripts/attachments.js | ||
|---|---|---|
|
function onLoadstart(e) {
|
||
|
fileSpan.removeClass('ajax-waiting');
|
||
|
fileSpan.addClass('ajax-loading');
|
||
|
fileSpan.removeClass('attachment-upload-error');
|
||
|
attachmentIcon.addClass('svg-loader');
|
||
|
updateSVGIcon(attachmentIcon[0], 'loader')
|
||
|
$('input:submit', $(this).parents('form')).attr('disabled', 'disabled');
|
||
| ... | ... | |
|
addInlineAttachmentMarkup(file);
|
||
|
progressSpan.progressbar( 'value', 100 ).remove();
|
||
|
fileSpan.find('input.description, a').css('display', 'inline-flex');
|
||
|
fileSpan.removeClass('attachment-upload-error');
|
||
|
updateSVGIcon(attachmentIcon[0], 'file');
|
||
|
})
|
||
|
.fail(function(result) {
|
||
|
$('<span>').insertAfter(progressSpan).text(result.statusText);
|
||
|
progressSpan.remove();
|
||
|
fileSpan.addClass('attachment-upload-error');
|
||
|
updateSVGIcon(attachmentIcon[0], 'warning');
|
||
|
}).always(function() {
|
||
|
ajaxUpload.uploading--;
|
||
| app/assets/stylesheets/application.css | ||
|---|---|---|
|
/* ToDo: delete this line when legacy icons are deleted */
|
||
|
.attachments_fields .icon-attachment, #existing-attachments .icon-attachment {background-image: none; padding-inline-start: 0}
|
||
|
.attachments_fields input.filename, #existing-attachments .filename {border: 0; inline-size: 250px; color: var(--oc-gray-7); background-color: inherit; }
|
||
|
.attachments_fields > span.attachment-upload-error,
|
||
|
.attachments_fields > span.attachment-upload-error input.filename {
|
||
|
color: var(--oc-pink-9);
|
||
|
}
|
||
|
.attachments_fields > span.attachment-upload-error svg.icon-svg {
|
||
|
stroke: currentColor;
|
||
|
}
|
||
|
.tabular input.filename {max-inline-size: 75% !important;}
|
||
|
.attachments_fields div.ui-progressbar {
|
||
|
inline-size: 100px;
|
||