Media Grid:

* Move the grid down via CSS transition when the Screen Options slide open.
* Remove some unused CSS for grid options.

See #24716.


git-svn-id: https://develop.svn.wordpress.org/trunk@29086 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-07-11 05:33:29 +00:00
parent e52c72c366
commit ce01c5c760
3 changed files with 23 additions and 10 deletions

View File

@ -150,6 +150,8 @@ screenMeta = {
panel.focus(); panel.focus();
link.addClass('screen-meta-active').attr('aria-expanded', true); link.addClass('screen-meta-active').attr('aria-expanded', true);
}); });
$( document ).trigger( 'screen:options:open' );
}, },
close: function( panel, link ) { close: function( panel, link ) {
@ -158,6 +160,8 @@ screenMeta = {
$('.screen-meta-toggle').css('visibility', ''); $('.screen-meta-toggle').css('visibility', '');
panel.parent().hide(); panel.parent().hide();
}); });
$( document ).trigger( 'screen:options:close' );
} }
}; };

View File

@ -2580,22 +2580,13 @@ video#inline-media-node {
line-height: 29px; line-height: 29px;
} }
.media-grid-view .view-switch, .media-grid-view .view-switch {
.media-grid-field-options {
display: inline-block; display: inline-block;
float: none; float: none;
margin-top: 13px; margin-top: 13px;
vertical-align: middle; vertical-align: middle;
} }
.media-grid-field-options span {
padding-right: 5px;
}
.media-grid-field-options label {
margin-right: 10px;
}
/** /**
* Position both the frame and the uploader window into the content * Position both the frame and the uploader window into the content
* area of the screen. * area of the screen.
@ -2607,7 +2598,14 @@ video#inline-media-node {
left: 160px; left: 160px;
right: 0; right: 0;
top: 32px; top: 32px;
-webkit-transition: 200ms ease-in-out;
transition: 200ms ease-in-out;
} }
.media-grid-view-options {
top: 120px;
}
@media screen and (max-width: 900px) { @media screen and (max-width: 900px) {
.auto-fold .media-grid-view { .auto-fold .media-grid-view {
left: 36px; left: 36px;

View File

@ -102,6 +102,9 @@
}); });
$(document).on( 'click', '.add-new-h2', _.bind( this.addNewClickHandler, this ) ); $(document).on( 'click', '.add-new-h2', _.bind( this.addNewClickHandler, this ) );
$(document).on( 'screen:options:open', _.bind( this.screenOptionsOpen, this ) );
$(document).on( 'screen:options:close', _.bind( this.screenOptionsClose, this ) );
// Ensure core and media grid view UI is enabled. // Ensure core and media grid view UI is enabled.
this.$el.addClass('wp-core-ui media-grid-view'); this.$el.addClass('wp-core-ui media-grid-view');
@ -152,6 +155,14 @@
_.delay( _.bind( this.createRouter, this ), 1000 ); _.delay( _.bind( this.createRouter, this ), 1000 );
}, },
screenOptionsOpen: function() {
this.$el.addClass( 'media-grid-view-options' );
},
screenOptionsClose: function() {
this.$el.removeClass( 'media-grid-view-options' );
},
createRouter: function() { createRouter: function() {
this.gridRouter = new media.view.MediaFrame.Manage.Router(); this.gridRouter = new media.view.MediaFrame.Manage.Router();