WordPress.org

Make WordPress Core

Changeset 45841


Ignore:
Timestamp:
08/19/2019 04:33:43 AM (4 weeks ago)
Author:
SergeyBiryukov
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, karmatosed.
Merges [45701] to the 5.2 branch.
Fixes #46757, #46758

Location:
branches/5.2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

  • branches/5.2/src/js/media/views/attachments/browser.js

    r45147 r45841  
    190190                text: mediaTrash ? l10n.trashSelected : l10n.deletePermanently,
    191191                controller: this.controller,
    192                 priority: -60,
     192                priority: -80,
    193193                click: function() {
    194194                    var changed = [], removed = [],
     
    246246                this.toolbar.set( 'deleteSelectedPermanentlyButton', new wp.media.view.DeleteSelectedPermanentlyButton({
    247247                    filters: Filters,
    248                     style: 'primary',
     248                    style: 'link button-link-delete',
    249249                    disabled: true,
    250250                    text: l10n.deletePermanently,
  • branches/5.2/src/js/media/views/button/delete-selected.js

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

    r45509 r45841  
    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.