(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
-/*globals wp */
-
/**
* wp.media.controller.EditAttachmentMetadata
*
module.exports = EditAttachmentMetadata;
},{}],2:[function(require,module,exports){
-/*globals wp */
-
var media = wp.media;
media.controller.EditAttachmentMetadata = require( './controllers/edit-attachment-metadata.js' );
media.view.DeleteSelectedPermanentlyButton = require( './views/button/delete-selected-permanently.js' );
},{"./controllers/edit-attachment-metadata.js":1,"./routers/manage.js":3,"./views/attachment/details-two-column.js":4,"./views/button/delete-selected-permanently.js":5,"./views/button/delete-selected.js":6,"./views/button/select-mode-toggle.js":7,"./views/edit-image-details.js":8,"./views/frame/edit-attachments.js":9,"./views/frame/manage.js":10}],3:[function(require,module,exports){
-/*globals wp, Backbone */
-
/**
* wp.media.view.MediaFrame.Manage.Router
*
module.exports = Router;
},{}],4:[function(require,module,exports){
-/*globals wp */
-
/**
* wp.media.view.Attachment.Details.TwoColumn
*
module.exports = TwoColumn;
},{}],5:[function(require,module,exports){
-/*globals wp */
-
/**
* wp.media.view.DeleteSelectedPermanentlyButton
*
module.exports = DeleteSelectedPermanently;
},{}],6:[function(require,module,exports){
-/*globals wp */
-
/**
* wp.media.view.DeleteSelectedButton
*
module.exports = DeleteSelected;
},{}],7:[function(require,module,exports){
-/*globals wp */
-
/**
* wp.media.view.SelectModeToggleButton
*
SelectModeToggle = Button.extend({
initialize: function() {
+ _.defaults( this.options, {
+ size : ''
+ } );
+
Button.prototype.initialize.apply( this, arguments );
this.listenTo( this.controller, 'select:activate select:deactivate', this.toggleBulkEditHandler );
this.listenTo( this.controller, 'selection:action:done', this.back );
// TODO: the Frame should be doing all of this.
if ( this.controller.isModeActive( 'select' ) ) {
- this.model.set( 'text', l10n.cancelSelection );
- children.not( '.media-button' ).hide();
+ this.model.set( {
+ size: 'large',
+ text: l10n.cancelSelection
+ } );
+ children.not( '.spinner, .media-button' ).hide();
this.$el.show();
toolbar.$( '.delete-selected-button' ).removeClass( 'hidden' );
} else {
- this.model.set( 'text', l10n.bulkSelect );
+ this.model.set( {
+ size: '',
+ text: l10n.bulkSelect
+ } );
this.controller.content.get().$el.removeClass( 'fixed' );
toolbar.$el.css( 'width', '' );
toolbar.$( '.delete-selected-button' ).addClass( 'hidden' );
- children.not( '.spinner, .media-button' ).show();
+ children.not( '.media-button' ).show();
this.controller.state().get( 'selection' ).reset();
}
}
module.exports = SelectModeToggle;
},{}],8:[function(require,module,exports){
-/*globals wp, _ */
-
/**
* wp.media.view.EditImage.Details
*
module.exports = Details;
},{}],9:[function(require,module,exports){
-/*globals wp, _, jQuery */
-
/**
* wp.media.view.MediaFrame.EditAttachments
*
module.exports = EditAttachments;
},{}],10:[function(require,module,exports){
-/*globals wp, _, Backbone */
-
/**
* wp.media.view.MediaFrame.Manage
*
this.$window = $( window );
this.$adminBar = $( '#wpadminbar' );
this.$window.on( 'scroll resize', _.debounce( _.bind( this.fixPosition, this ), 15 ) );
- $( document ).on( 'click', '.add-new-h2', _.bind( this.addNewClickHandler, this ) );
+ $( document ).on( 'click', '.page-title-action', _.bind( this.addNewClickHandler, this ) );
// Ensure core and media grid view UI is enabled.
this.$el.addClass('wp-core-ui');