Make WordPress Core

Changeset 45701


Ignore:
Timestamp:
07/30/2019 11:19:18 PM (6 years ago)
Author:
karmatosed
Message:

Media: Reduces the bulk media options to have one primary button

This fixes where 2 primary buttons were showing for bulk actions within media trash.

Props garrett-eclipse, afercia, ianbelanger, SergeyBiryukov
Fixes #46757, #46758

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/media/views/attachments/browser.js

    r45524 r45701  
    191191                text: mediaTrash ? l10n.trashSelected : l10n.deletePermanently,
    192192                controller: this.controller,
    193                 priority: -60,
     193                priority: -80,
    194194                click: function() {
    195195                    var changed = [], removed = [],
     
    247247                this.toolbar.set( 'deleteSelectedPermanentlyButton', new wp.media.view.DeleteSelectedPermanentlyButton({
    248248                    filters: Filters,
    249                     style: 'primary',
     249                    style: 'link button-link-delete',
    250250                    disabled: true,
    251251                    text: l10n.deletePermanently,
  • trunk/src/js/media/views/button/delete-selected.js

    r45147 r45701  
    2323        }
    2424        this.controller.on( 'selection:toggle', this.toggleDisabled, this );
     25        this.controller.on( 'select:activate', this.toggleDisabled, this );
    2526    },
    2627
  • trunk/src/wp-includes/css/buttons.css

    r45503 r45701  
    225225.wp-core-ui .button-link-delete:focus {
    226226    color: #dc3232;
     227    background: transparent;
     228}
     229
     230.wp-core-ui .button-link-delete:disabled {
     231    /* overrides the default buttons disabled background */
     232    background: transparent !important;
    227233}
    228234
Note: See TracChangeset for help on using the changeset viewer.