Media: only apply `wp-filter` class to the grid view toolbar.
props gcorne. fixes #29381. Built from https://develop.svn.wordpress.org/trunk@29629 git-svn-id: http://core.svn.wordpress.org/trunk@29403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c392ff6f90
commit
7586e15e0d
|
@ -3911,7 +3911,7 @@
|
|||
*/
|
||||
media.view.Toolbar = media.View.extend({
|
||||
tagName: 'div',
|
||||
className: 'media-toolbar wp-filter',
|
||||
className: 'media-toolbar',
|
||||
|
||||
initialize: function() {
|
||||
var state = this.controller.state(),
|
||||
|
@ -5750,14 +5750,20 @@
|
|||
},
|
||||
|
||||
createToolbar: function() {
|
||||
var LibraryViewSwitcher, Filters;
|
||||
var LibraryViewSwitcher, Filters, toolbarOptions;
|
||||
|
||||
toolbarOptions = {
|
||||
controller: this.controller
|
||||
};
|
||||
|
||||
if ( this.controller.isModeActive( 'grid' ) ) {
|
||||
toolbarOptions.className = 'media-toolbar wp-filter';
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {wp.media.view.Toolbar}
|
||||
*/
|
||||
this.toolbar = new media.view.Toolbar({
|
||||
controller: this.controller
|
||||
});
|
||||
* @member {wp.media.view.Toolbar}
|
||||
*/
|
||||
this.toolbar = new media.view.Toolbar( toolbarOptions );
|
||||
|
||||
this.views.add( this.toolbar );
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue