Some pre-commit cleanup of media-grid.js and media-views.js

git-svn-id: https://develop.svn.wordpress.org/trunk@29494 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2014-08-15 01:12:32 +00:00
parent 97eb710697
commit 22eca56a81
3 changed files with 13 additions and 9 deletions

View File

@ -2255,6 +2255,7 @@ div.action-links {
right: 0;
left: 0;
min-height: 100%;
min-height: -webkit-calc( 100% - 346px );
min-height: calc( 100% - 346px );
}

View File

@ -1,4 +1,4 @@
/* global _wpMediaViewsL10n, MediaElementPlayer, _wpMediaGridSettings, confirm */
/* global _wpMediaViewsL10n, MediaElementPlayer, _wpMediaGridSettings */
(function($, _, Backbone, wp) {
// Local reference to the WordPress media namespace.
var media = wp.media, l10n;
@ -157,7 +157,7 @@
}
$browser = this.$('.attachments-browser');
$toolbar = $browser.find('.media-toolbar')
$toolbar = $browser.find('.media-toolbar');
if ( $browser.offset().top < this.$window.scrollTop() + this.$adminBar.height() ) {
$browser.addClass( 'fixed' );

View File

@ -5718,8 +5718,9 @@
priority: 50
};
if ( media.view.settings.mediaTrash
&& this.controller.activeModes.where( { id: 'grid' } ).length ) {
if ( media.view.settings.mediaTrash &&
this.controller.activeModes.where( { id: 'grid' } ).length ) {
filters.trash = {
text: l10n.trash,
props: {
@ -5882,9 +5883,10 @@
return;
}
if ( media.view.settings.mediaTrash
&& 'trash' !== selection.at( 0 ).get( 'status' )
&& ! confirm( l10n.warnBulkTrash ) ) {
if ( media.view.settings.mediaTrash &&
'trash' !== selection.at( 0 ).get( 'status' ) &&
! confirm( l10n.warnBulkTrash ) ) {
return;
}
@ -6514,8 +6516,9 @@
var library = this.controller.library;
event.preventDefault();
if ( media.view.settings.mediaTrash
&& 'edit-metadata' === this.controller.content.mode() ) {
if ( media.view.settings.mediaTrash &&
'edit-metadata' === this.controller.content.mode() ) {
this.model.set( 'status', 'trash' );
this.model.save().done( function() {
library._requery( true );