Project

General

Profile

Patch #43381 » 0002-Improve-attachment-upload-error-visibility.patch

Go MAEDA, 2026-02-16 07:54

View differences:

app/assets/javascripts/attachments.js
50 50
  function onLoadstart(e) {
51 51
    fileSpan.removeClass('ajax-waiting');
52 52
    fileSpan.addClass('ajax-loading');
53
    fileSpan.removeClass('attachment-upload-error');
53 54
    attachmentIcon.addClass('svg-loader');
54 55
    updateSVGIcon(attachmentIcon[0], 'loader')
55 56
    $('input:submit', $(this).parents('form')).attr('disabled', 'disabled');
......
73 74
        addInlineAttachmentMarkup(file);
74 75
        progressSpan.progressbar( 'value', 100 ).remove();
75 76
        fileSpan.find('input.description, a').css('display', 'inline-flex');
77
        fileSpan.removeClass('attachment-upload-error');
76 78
        updateSVGIcon(attachmentIcon[0], 'file');
77 79
      })
78 80
      .fail(function(result) {
79 81
        $('<span>').insertAfter(progressSpan).text(result.statusText);
80 82
        progressSpan.remove();
83
        fileSpan.addClass('attachment-upload-error');
81 84
        updateSVGIcon(attachmentIcon[0], 'warning');
82 85
      }).always(function() {
83 86
        ajaxUpload.uploading--;
app/assets/stylesheets/application.css
1259 1259
/* ToDo: delete this line when legacy icons are deleted */
1260 1260
.attachments_fields .icon-attachment, #existing-attachments .icon-attachment {background-image: none; padding-inline-start: 0}
1261 1261
.attachments_fields input.filename, #existing-attachments .filename {border: 0; inline-size: 250px; color: var(--oc-gray-7); background-color: inherit; }
1262
.attachments_fields > span.attachment-upload-error,
1263
.attachments_fields > span.attachment-upload-error input.filename {
1264
  color: var(--oc-pink-9);
1265
}
1266
.attachments_fields > span.attachment-upload-error svg.icon-svg {
1267
  stroke: currentColor;
1268
}
1262 1269
.tabular input.filename {max-inline-size: 75% !important;}
1263 1270
.attachments_fields div.ui-progressbar {
1264 1271
  inline-size: 100px;
(5-5/7)