Make WordPress Core

Changeset 29629

Timestamp:
08/26/2014 07:05:44 PM (10 years ago)
Author:
helen
Message:

Media: only apply wp-filter class to the grid view toolbar.

props gcorne.
fixes #29381.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-views.js

    r29625 r29629  
    39123912    media.view.Toolbar = media.View.extend({
    39133913        tagName:   'div',
    3914         className: 'media-toolbar wp-filter',
     3914        className: 'media-toolbar',
    39153915
    39163916        initialize: function() {
     
    57515751
    57525752        createToolbar: function() {
    5753             var LibraryViewSwitcher, Filters;
     5753            var LibraryViewSwitcher, Filters, toolbarOptions;
     5754
     5755            toolbarOptions = {
     5756                controller: this.controller
     5757            };
     5758
     5759            if ( this.controller.isModeActive( 'grid' ) ) {
     5760                toolbarOptions.className = 'media-toolbar wp-filter';
     5761            }
    57545762
    57555763            /**
    5756              * @member {wp.media.view.Toolbar}
    5757              */
    5758             this.toolbar = new media.view.Toolbar({
    5759                 controller: this.controller
    5760             });
     5764            * @member {wp.media.view.Toolbar}
     5765            */
     5766            this.toolbar = new media.view.Toolbar( toolbarOptions );
    57615767
    57625768            this.views.add( this.toolbar );
Note: See TracChangeset for help on using the changeset viewer.