Media Grid:

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

See #24716.

Built from https://develop.svn.wordpress.org/trunk@29086


git-svn-id: http://core.svn.wordpress.org/trunk@28872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-07-11 05:34:14 +00:00
parent ceff8de594
commit ea42b8e48e
8 changed files with 35 additions and 24 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' );
} }
}; };

File diff suppressed because one or more lines are too long

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-left: 5px;
}
.media-grid-field-options label {
margin-left: 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 {
right: 160px; right: 160px;
left: 0; left: 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 {
right: 36px; right: 36px;

File diff suppressed because one or more lines are too long

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;

File diff suppressed because one or more lines are too long

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();

File diff suppressed because one or more lines are too long