WordPress.org

Make WordPress Core

Ticket #48403: 48403.2.diff

File 48403.2.diff, 1.5 KB (added by afercia, 18 months ago)
  • src/js/media/views/attachments/browser.js

     
    4949                }
    5050
    5151                /*
    52                  * For accessibility reasons, place the Inline Uploader before other sections.
    53                  * This way, in the Media Library, it's right after the Add New button, see ticket #37188.
     52                 * In the grid mode (the Media Library), place the Inline Uploader before
     53                 * other sections so that the visual order and the DOM order match. This way,
     54                 * the Inline Uploader in the Media Library is right after the "Add New"
     55                 * button, see ticket #37188.
    5456                 */
    55                 this.createUploader();
     57                if ( this.controller.isModeActive( 'grid' ) ) {
     58                        this.createUploader();
    5659
    57                 /*
    58                  * Create a multi-purpose toolbar. Used as main toolbar in the Media Library
    59                  * and also for other things, for example the "Drag and drop to reorder" and
    60                  * "Suggested dimensions" info in the media modal.
    61                  */
    62                 this.createToolbar();
     60                        /*
     61                         * Create a multi-purpose toolbar. Used as main toolbar in the Media Library
     62                         * and also for other things, for example the "Drag and drop to reorder" and
     63                         * "Suggested dimensions" info in the media modal.
     64                         */
     65                        this.createToolbar();
     66                } else {
     67                        this.createToolbar();
     68                        this.createUploader();
     69                }
    6370
     71
    6472                // Add a heading before the attachments list.
    6573                this.createAttachmentsHeading();
    6674