<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[31379] trunk/src/wp-includes/js/media: Make sure that `media/views.js` doesn't load Models that already exist in `media/models.js`.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/31379">31379</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/31379","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>wonderboymusic</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-02-09 04:13:38 +0000 (Mon, 09 Feb 2015)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Make sure that `media/views.js` doesn't load Models that already exist in `media/models.js`.
See <a href="https://core.trac.wordpress.org/ticket/28510">#28510</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesjsmediaaudiovideojs">trunk/src/wp-includes/js/media/audio-video.js</a></li>
<li><a href="#trunksrcwpincludesjsmediacontrollerscollectionaddjs">trunk/src/wp-includes/js/media/controllers/collection-add.js</a></li>
<li><a href="#trunksrcwpincludesjsmediacontrollerscollectioneditjs">trunk/src/wp-includes/js/media/controllers/collection-edit.js</a></li>
<li><a href="#trunksrcwpincludesjsmediacontrollersfeaturedimagejs">trunk/src/wp-includes/js/media/controllers/featured-image.js</a></li>
<li><a href="#trunksrcwpincludesjsmediacontrollersgalleryaddjs">trunk/src/wp-includes/js/media/controllers/gallery-add.js</a></li>
<li><a href="#trunksrcwpincludesjsmediacontrollersgalleryeditjs">trunk/src/wp-includes/js/media/controllers/gallery-edit.js</a></li>
<li><a href="#trunksrcwpincludesjsmediacontrollerslibraryjs">trunk/src/wp-includes/js/media/controllers/library.js</a></li>
<li><a href="#trunksrcwpincludesjsmediagridjs">trunk/src/wp-includes/js/media/grid.js</a></li>
<li><a href="#trunksrcwpincludesjsmediaviewsframeimagedetailsjs">trunk/src/wp-includes/js/media/views/frame/image-details.js</a></li>
<li><a href="#trunksrcwpincludesjsmediaviewsframemediadetailsjs">trunk/src/wp-includes/js/media/views/frame/media-details.js</a></li>
<li><a href="#trunksrcwpincludesjsmediaviewsframepostjs">trunk/src/wp-includes/js/media/views/frame/post.js</a></li>
<li><a href="#trunksrcwpincludesjsmediaviewsframeselectjs">trunk/src/wp-includes/js/media/views/frame/select.js</a></li>
<li><a href="#trunksrcwpincludesjsmediaviewsjs">trunk/src/wp-includes/js/media/views.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesjsmediaaudiovideojs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/media/audio-video.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media/audio-video.js 2015-02-09 03:58:35 UTC (rev 31378)
+++ trunk/src/wp-includes/js/media/audio-video.js 2015-02-09 04:13:38 UTC (rev 31379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -223,7 +223,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> media.view.VideoDetails = require( './views/video-details.js' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> }(_));
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./controllers/audio-details.js":2,"./controllers/video-details.js":8,"./models/post-media.js":11,"./views/audio-details.js":25,"./views/frame/audio-details.js":29,"./views/frame/media-details.js":30,"./views/frame/video-details.js":32,"./views/media-details.js":35,"./views/video-details.js":54}],2:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./controllers/audio-details.js":2,"./controllers/video-details.js":8,"./models/post-media.js":9,"./views/audio-details.js":21,"./views/frame/audio-details.js":25,"./views/frame/media-details.js":26,"./views/frame/video-details.js":28,"./views/media-details.js":31,"./views/video-details.js":50}],2:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -293,7 +293,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> var selectionSync = require( '../utils/selection-sync.js' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- Selection = require( '../models/selection.js' ),
</del><span class="cx" style="display: block; padding: 0 10px"> State = require( './state.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> l10n = wp.media.view.l10n,
</span><span class="cx" style="display: block; padding: 0 10px"> Library;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -338,7 +337,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> props = _.omit( props, 'orderby', 'query' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- this.set( 'selection', new Selection( null, {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ this.set( 'selection', new wp.media.model.Selection( null, {
</ins><span class="cx" style="display: block; padding: 0 10px"> multiple: this.get('multiple'),
</span><span class="cx" style="display: block; padding: 0 10px"> props: props
</span><span class="cx" style="display: block; padding: 0 10px"> }) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -529,7 +528,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> _.extend( Library.prototype, selectionSync );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Library;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../models/selection.js":13,"../utils/selection-sync.js":14,"./state.js":7}],4:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../utils/selection-sync.js":10,"./state.js":7}],4:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1160,711 +1159,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = VideoDetails;
</span><span class="cx" style="display: block; padding: 0 10px"> },{"./state.js":7}],9:[function(require,module,exports){
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-/*globals jQuery, Backbone, _, wp */
-
-/**
- * wp.media.model.Attachment
- *
- * @class
- * @augments Backbone.Model
- */
-var $ = jQuery,
- Attachment;
-
-Attachment = Backbone.Model.extend({
- /**
- * Triggered when attachment details change
- * Overrides Backbone.Model.sync
- *
- * @param {string} method
- * @param {wp.media.model.Attachment} model
- * @param {Object} [options={}]
- *
- * @returns {Promise}
- */
- sync: function( method, model, options ) {
- // If the attachment does not yet have an `id`, return an instantly
- // rejected promise. Otherwise, all of our requests will fail.
- if ( _.isUndefined( this.id ) ) {
- return $.Deferred().rejectWith( this ).promise();
- }
-
- // Overload the `read` request so Attachment.fetch() functions correctly.
- if ( 'read' === method ) {
- options = options || {};
- options.context = this;
- options.data = _.extend( options.data || {}, {
- action: 'get-attachment',
- id: this.id
- });
- return wp.media.ajax( options );
-
- // Overload the `update` request so properties can be saved.
- } else if ( 'update' === method ) {
- // If we do not have the necessary nonce, fail immeditately.
- if ( ! this.get('nonces') || ! this.get('nonces').update ) {
- return $.Deferred().rejectWith( this ).promise();
- }
-
- options = options || {};
- options.context = this;
-
- // Set the action and ID.
- options.data = _.extend( options.data || {}, {
- action: 'save-attachment',
- id: this.id,
- nonce: this.get('nonces').update,
- post_id: wp.media.model.settings.post.id
- });
-
- // Record the values of the changed attributes.
- if ( model.hasChanged() ) {
- options.data.changes = {};
-
- _.each( model.changed, function( value, key ) {
- options.data.changes[ key ] = this.get( key );
- }, this );
- }
-
- return wp.media.ajax( options );
-
- // Overload the `delete` request so attachments can be removed.
- // This will permanently delete an attachment.
- } else if ( 'delete' === method ) {
- options = options || {};
-
- if ( ! options.wait ) {
- this.destroyed = true;
- }
-
- options.context = this;
- options.data = _.extend( options.data || {}, {
- action: 'delete-post',
- id: this.id,
- _wpnonce: this.get('nonces')['delete']
- });
-
- return wp.media.ajax( options ).done( function() {
- this.destroyed = true;
- }).fail( function() {
- this.destroyed = false;
- });
-
- // Otherwise, fall back to `Backbone.sync()`.
- } else {
- /**
- * Call `sync` directly on Backbone.Model
- */
- return Backbone.Model.prototype.sync.apply( this, arguments );
- }
- },
- /**
- * Convert date strings into Date objects.
- *
- * @param {Object} resp The raw response object, typically returned by fetch()
- * @returns {Object} The modified response object, which is the attributes hash
- * to be set on the model.
- */
- parse: function( resp ) {
- if ( ! resp ) {
- return resp;
- }
-
- resp.date = new Date( resp.date );
- resp.modified = new Date( resp.modified );
- return resp;
- },
- /**
- * @param {Object} data The properties to be saved.
- * @param {Object} options Sync options. e.g. patch, wait, success, error.
- *
- * @this Backbone.Model
- *
- * @returns {Promise}
- */
- saveCompat: function( data, options ) {
- var model = this;
-
- // If we do not have the necessary nonce, fail immeditately.
- if ( ! this.get('nonces') || ! this.get('nonces').update ) {
- return $.Deferred().rejectWith( this ).promise();
- }
-
- return media.post( 'save-attachment-compat', _.defaults({
- id: this.id,
- nonce: this.get('nonces').update,
- post_id: wp.media.model.settings.post.id
- }, data ) ).done( function( resp, status, xhr ) {
- model.set( model.parse( resp, xhr ), options );
- });
- }
-}, {
- /**
- * Create a new model on the static 'all' attachments collection and return it.
- *
- * @static
- * @param {Object} attrs
- * @returns {wp.media.model.Attachment}
- */
- create: function( attrs ) {
- var Attachments = require( './attachments.js' );
- return Attachments.all.push( attrs );
- },
- /**
- * Create a new model on the static 'all' attachments collection and return it.
- *
- * If this function has already been called for the id,
- * it returns the specified attachment.
- *
- * @static
- * @param {string} id A string used to identify a model.
- * @param {Backbone.Model|undefined} attachment
- * @returns {wp.media.model.Attachment}
- */
- get: _.memoize( function( id, attachment ) {
- var Attachments = require( './attachments.js' );
- return Attachments.all.push( attachment || { id: id } );
- })
-});
-
-module.exports = Attachment;
-},{"./attachments.js":10}],10:[function(require,module,exports){
-/*globals jQuery, Backbone, _, wp */
-
-/**
- * wp.media.model.Attachments
- *
- * A collection of attachments.
- *
- * This collection has no persistence with the server without supplying
- * 'options.props.query = true', which will mirror the collection
- * to an Attachments Query collection - @see wp.media.model.Attachments.mirror().
- *
- * @class
- * @augments Backbone.Collection
- *
- * @param {array} [models] Models to initialize with the collection.
- * @param {object} [options] Options hash for the collection.
- * @param {string} [options.props] Options hash for the initial query properties.
- * @param {string} [options.props.order] Initial order (ASC or DESC) for the collection.
- * @param {string} [options.props.orderby] Initial attribute key to order the collection by.
- * @param {string} [options.props.query] Whether the collection is linked to an attachments query.
- * @param {string} [options.observe]
- * @param {string} [options.filters]
- *
- */
-var Attachment = require( './attachment.js' ),
- Attachments;
-
-Attachments = Backbone.Collection.extend({
- /**
- * @type {wp.media.model.Attachment}
- */
- model: Attachment,
- /**
- * @param {Array} [models=[]] Array of models used to populate the collection.
- * @param {Object} [options={}]
- */
- initialize: function( models, options ) {
- options = options || {};
-
- this.props = new Backbone.Model();
- this.filters = options.filters || {};
-
- // Bind default `change` events to the `props` model.
- this.props.on( 'change', this._changeFilteredProps, this );
-
- this.props.on( 'change:order', this._changeOrder, this );
- this.props.on( 'change:orderby', this._changeOrderby, this );
- this.props.on( 'change:query', this._changeQuery, this );
-
- this.props.set( _.defaults( options.props || {} ) );
-
- if ( options.observe ) {
- this.observe( options.observe );
- }
- },
- /**
- * Sort the collection when the order attribute changes.
- *
- * @access private
- */
- _changeOrder: function() {
- if ( this.comparator ) {
- this.sort();
- }
- },
- /**
- * Set the default comparator only when the `orderby` property is set.
- *
- * @access private
- *
- * @param {Backbone.Model} model
- * @param {string} orderby
- */
- _changeOrderby: function( model, orderby ) {
- // If a different comparator is defined, bail.
- if ( this.comparator && this.comparator !== Attachments.comparator ) {
- return;
- }
-
- if ( orderby && 'post__in' !== orderby ) {
- this.comparator = Attachments.comparator;
- } else {
- delete this.comparator;
- }
- },
- /**
- * If the `query` property is set to true, query the server using
- * the `props` values, and sync the results to this collection.
- *
- * @access private
- *
- * @param {Backbone.Model} model
- * @param {Boolean} query
- */
- _changeQuery: function( model, query ) {
- if ( query ) {
- this.props.on( 'change', this._requery, this );
- this._requery();
- } else {
- this.props.off( 'change', this._requery, this );
- }
- },
- /**
- * @access private
- *
- * @param {Backbone.Model} model
- */
- _changeFilteredProps: function( model ) {
- // If this is a query, updating the collection will be handled by
- // `this._requery()`.
- if ( this.props.get('query') ) {
- return;
- }
-
- var changed = _.chain( model.changed ).map( function( t, prop ) {
- var filter = Attachments.filters[ prop ],
- term = model.get( prop );
-
- if ( ! filter ) {
- return;
- }
-
- if ( term && ! this.filters[ prop ] ) {
- this.filters[ prop ] = filter;
- } else if ( ! term && this.filters[ prop ] === filter ) {
- delete this.filters[ prop ];
- } else {
- return;
- }
-
- // Record the change.
- return true;
- }, this ).any().value();
-
- if ( ! changed ) {
- return;
- }
-
- // If no `Attachments` model is provided to source the searches
- // from, then automatically generate a source from the existing
- // models.
- if ( ! this._source ) {
- this._source = new Attachments( this.models );
- }
-
- this.reset( this._source.filter( this.validator, this ) );
- },
-
- validateDestroyed: false,
- /**
- * Checks whether an attachment is valid.
- *
- * @param {wp.media.model.Attachment} attachment
- * @returns {Boolean}
- */
- validator: function( attachment ) {
- if ( ! this.validateDestroyed && attachment.destroyed ) {
- return false;
- }
- return _.all( this.filters, function( filter ) {
- return !! filter.call( this, attachment );
- }, this );
- },
- /**
- * Add or remove an attachment to the collection depending on its validity.
- *
- * @param {wp.media.model.Attachment} attachment
- * @param {Object} options
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- validate: function( attachment, options ) {
- var valid = this.validator( attachment ),
- hasAttachment = !! this.get( attachment.cid );
-
- if ( ! valid && hasAttachment ) {
- this.remove( attachment, options );
- } else if ( valid && ! hasAttachment ) {
- this.add( attachment, options );
- }
-
- return this;
- },
-
- /**
- * Add or remove all attachments from another collection depending on each one's validity.
- *
- * @param {wp.media.model.Attachments} attachments
- * @param {object} [options={}]
- *
- * @fires wp.media.model.Attachments#reset
- *
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- validateAll: function( attachments, options ) {
- options = options || {};
-
- _.each( attachments.models, function( attachment ) {
- this.validate( attachment, { silent: true });
- }, this );
-
- if ( ! options.silent ) {
- this.trigger( 'reset', this, options );
- }
- return this;
- },
- /**
- * Start observing another attachments collection change events
- * and replicate them on this collection.
- *
- * @param {wp.media.model.Attachments} The attachments collection to observe.
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining.
- */
- observe: function( attachments ) {
- this.observers = this.observers || [];
- this.observers.push( attachments );
-
- attachments.on( 'add change remove', this._validateHandler, this );
- attachments.on( 'reset', this._validateAllHandler, this );
- this.validateAll( attachments );
- return this;
- },
- /**
- * Stop replicating collection change events from another attachments collection.
- *
- * @param {wp.media.model.Attachments} The attachments collection to stop observing.
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- unobserve: function( attachments ) {
- if ( attachments ) {
- attachments.off( null, null, this );
- this.observers = _.without( this.observers, attachments );
-
- } else {
- _.each( this.observers, function( attachments ) {
- attachments.off( null, null, this );
- }, this );
- delete this.observers;
- }
-
- return this;
- },
- /**
- * @access private
- *
- * @param {wp.media.model.Attachments} attachment
- * @param {wp.media.model.Attachments} attachments
- * @param {Object} options
- *
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- _validateHandler: function( attachment, attachments, options ) {
- // If we're not mirroring this `attachments` collection,
- // only retain the `silent` option.
- options = attachments === this.mirroring ? options : {
- silent: options && options.silent
- };
-
- return this.validate( attachment, options );
- },
- /**
- * @access private
- *
- * @param {wp.media.model.Attachments} attachments
- * @param {Object} options
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- _validateAllHandler: function( attachments, options ) {
- return this.validateAll( attachments, options );
- },
- /**
- * Start mirroring another attachments collection, clearing out any models already
- * in the collection.
- *
- * @param {wp.media.model.Attachments} The attachments collection to mirror.
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- mirror: function( attachments ) {
- if ( this.mirroring && this.mirroring === attachments ) {
- return this;
- }
-
- this.unmirror();
- this.mirroring = attachments;
-
- // Clear the collection silently. A `reset` event will be fired
- // when `observe()` calls `validateAll()`.
- this.reset( [], { silent: true } );
- this.observe( attachments );
-
- return this;
- },
- /**
- * Stop mirroring another attachments collection.
- */
- unmirror: function() {
- if ( ! this.mirroring ) {
- return;
- }
-
- this.unobserve( this.mirroring );
- delete this.mirroring;
- },
- /**
- * Retrive more attachments from the server for the collection.
- *
- * Only works if the collection is mirroring a Query Attachments collection,
- * and forwards to its `more` method. This collection class doesn't have
- * server persistence by itself.
- *
- * @param {object} options
- * @returns {Promise}
- */
- more: function( options ) {
- var deferred = jQuery.Deferred(),
- mirroring = this.mirroring,
- attachments = this;
-
- if ( ! mirroring || ! mirroring.more ) {
- return deferred.resolveWith( this ).promise();
- }
- // If we're mirroring another collection, forward `more` to
- // the mirrored collection. Account for a race condition by
- // checking if we're still mirroring that collection when
- // the request resolves.
- mirroring.more( options ).done( function() {
- if ( this === attachments.mirroring )
- deferred.resolveWith( this );
- });
-
- return deferred.promise();
- },
- /**
- * Whether there are more attachments that haven't been sync'd from the server
- * that match the collection's query.
- *
- * Only works if the collection is mirroring a Query Attachments collection,
- * and forwards to its `hasMore` method. This collection class doesn't have
- * server persistence by itself.
- *
- * @returns {boolean}
- */
- hasMore: function() {
- return this.mirroring ? this.mirroring.hasMore() : false;
- },
- /**
- * A custom AJAX-response parser.
- *
- * See trac ticket #24753
- *
- * @param {Object|Array} resp The raw response Object/Array.
- * @param {Object} xhr
- * @returns {Array} The array of model attributes to be added to the collection
- */
- parse: function( resp, xhr ) {
- if ( ! _.isArray( resp ) ) {
- resp = [resp];
- }
-
- return _.map( resp, function( attrs ) {
- var id, attachment, newAttributes;
-
- if ( attrs instanceof Backbone.Model ) {
- id = attrs.get( 'id' );
- attrs = attrs.attributes;
- } else {
- id = attrs.id;
- }
-
- attachment = Attachment.get( id );
- newAttributes = attachment.parse( attrs, xhr );
-
- if ( ! _.isEqual( attachment.attributes, newAttributes ) ) {
- attachment.set( newAttributes );
- }
-
- return attachment;
- });
- },
- /**
- * If the collection is a query, create and mirror an Attachments Query collection.
- *
- * @access private
- */
- _requery: function( refresh ) {
- var props, Query;
- if ( this.props.get('query') ) {
- Query = require( './query.js' );
- props = this.props.toJSON();
- props.cache = ( true !== refresh );
- this.mirror( Query.get( props ) );
- }
- },
- /**
- * If this collection is sorted by `menuOrder`, recalculates and saves
- * the menu order to the database.
- *
- * @returns {undefined|Promise}
- */
- saveMenuOrder: function() {
- if ( 'menuOrder' !== this.props.get('orderby') ) {
- return;
- }
-
- // Removes any uploading attachments, updates each attachment's
- // menu order, and returns an object with an { id: menuOrder }
- // mapping to pass to the request.
- var attachments = this.chain().filter( function( attachment ) {
- return ! _.isUndefined( attachment.id );
- }).map( function( attachment, index ) {
- // Indices start at 1.
- index = index + 1;
- attachment.set( 'menuOrder', index );
- return [ attachment.id, index ];
- }).object().value();
-
- if ( _.isEmpty( attachments ) ) {
- return;
- }
-
- return wp.media.post( 'save-attachment-order', {
- nonce: wp.media.model.settings.post.nonce,
- post_id: wp.media.model.settings.post.id,
- attachments: attachments
- });
- }
-}, {
- /**
- * A function to compare two attachment models in an attachments collection.
- *
- * Used as the default comparator for instances of wp.media.model.Attachments
- * and its subclasses. @see wp.media.model.Attachments._changeOrderby().
- *
- * @static
- *
- * @param {Backbone.Model} a
- * @param {Backbone.Model} b
- * @param {Object} options
- * @returns {Number} -1 if the first model should come before the second,
- * 0 if they are of the same rank and
- * 1 if the first model should come after.
- */
- comparator: function( a, b, options ) {
- var key = this.props.get('orderby'),
- order = this.props.get('order') || 'DESC',
- ac = a.cid,
- bc = b.cid;
-
- a = a.get( key );
- b = b.get( key );
-
- if ( 'date' === key || 'modified' === key ) {
- a = a || new Date();
- b = b || new Date();
- }
-
- // If `options.ties` is set, don't enforce the `cid` tiebreaker.
- if ( options && options.ties ) {
- ac = bc = null;
- }
-
- return ( 'DESC' === order ) ? wp.media.compare( a, b, ac, bc ) : wp.media.compare( b, a, bc, ac );
- },
- /**
- * @namespace
- */
- filters: {
- /**
- * @static
- * Note that this client-side searching is *not* equivalent
- * to our server-side searching.
- *
- * @param {wp.media.model.Attachment} attachment
- *
- * @this wp.media.model.Attachments
- *
- * @returns {Boolean}
- */
- search: function( attachment ) {
- if ( ! this.props.get('search') ) {
- return true;
- }
-
- return _.any(['title','filename','description','caption','name'], function( key ) {
- var value = attachment.get( key );
- return value && -1 !== value.search( this.props.get('search') );
- }, this );
- },
- /**
- * @static
- * @param {wp.media.model.Attachment} attachment
- *
- * @this wp.media.model.Attachments
- *
- * @returns {Boolean}
- */
- type: function( attachment ) {
- var type = this.props.get('type');
- return ! type || -1 !== type.indexOf( attachment.get('type') );
- },
- /**
- * @static
- * @param {wp.media.model.Attachment} attachment
- *
- * @this wp.media.model.Attachments
- *
- * @returns {Boolean}
- */
- uploadedTo: function( attachment ) {
- var uploadedTo = this.props.get('uploadedTo');
- if ( _.isUndefined( uploadedTo ) ) {
- return true;
- }
-
- return uploadedTo === attachment.get('uploadedTo');
- },
- /**
- * @static
- * @param {wp.media.model.Attachment} attachment
- *
- * @this wp.media.model.Attachments
- *
- * @returns {Boolean}
- */
- status: function( attachment ) {
- var status = this.props.get('status');
- if ( _.isUndefined( status ) ) {
- return true;
- }
-
- return status === attachment.get('status');
- }
- }
-});
-
-module.exports = Attachments;
-},{"./attachment.js":9,"./query.js":12}],11:[function(require,module,exports){
</del><span class="cx" style="display: block; padding: 0 10px"> /*globals Backbone, _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1907,417 +1201,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = PostMedia;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],12:[function(require,module,exports){
-/*globals jQuery, _, wp */
-
-/**
- * wp.media.model.Query
- *
- * A collection of attachments that match the supplied query arguments.
- *
- * Note: Do NOT change this.args after the query has been initialized.
- * Things will break.
- *
- * @class
- * @augments wp.media.model.Attachments
- * @augments Backbone.Collection
- *
- * @param {array} [models] Models to initialize with the collection.
- * @param {object} [options] Options hash.
- * @param {object} [options.args] Attachments query arguments.
- * @param {object} [options.args.posts_per_page]
- */
-var Attachments = require( './attachments.js' ),
- Query;
-
-Query = Attachments.extend({
- /**
- * @global wp.Uploader
- *
- * @param {array} [models=[]] Array of initial models to populate the collection.
- * @param {object} [options={}]
- */
- initialize: function( models, options ) {
- var allowed;
-
- options = options || {};
- Attachments.prototype.initialize.apply( this, arguments );
-
- this.args = options.args;
- this._hasMore = true;
- this.created = new Date();
-
- this.filters.order = function( attachment ) {
- var orderby = this.props.get('orderby'),
- order = this.props.get('order');
-
- if ( ! this.comparator ) {
- return true;
- }
-
- // We want any items that can be placed before the last
- // item in the set. If we add any items after the last
- // item, then we can't guarantee the set is complete.
- if ( this.length ) {
- return 1 !== this.comparator( attachment, this.last(), { ties: true });
-
- // Handle the case where there are no items yet and
- // we're sorting for recent items. In that case, we want
- // changes that occurred after we created the query.
- } else if ( 'DESC' === order && ( 'date' === orderby || 'modified' === orderby ) ) {
- return attachment.get( orderby ) >= this.created;
-
- // If we're sorting by menu order and we have no items,
- // accept any items that have the default menu order (0).
- } else if ( 'ASC' === order && 'menuOrder' === orderby ) {
- return attachment.get( orderby ) === 0;
- }
-
- // Otherwise, we don't want any items yet.
- return false;
- };
-
- // Observe the central `wp.Uploader.queue` collection to watch for
- // new matches for the query.
- //
- // Only observe when a limited number of query args are set. There
- // are no filters for other properties, so observing will result in
- // false positives in those queries.
- allowed = [ 's', 'order', 'orderby', 'posts_per_page', 'post_mime_type', 'post_parent' ];
- if ( wp.Uploader && _( this.args ).chain().keys().difference( allowed ).isEmpty().value() ) {
- this.observe( wp.Uploader.queue );
- }
- },
- /**
- * Whether there are more attachments that haven't been sync'd from the server
- * that match the collection's query.
- *
- * @returns {boolean}
- */
- hasMore: function() {
- return this._hasMore;
- },
- /**
- * Fetch more attachments from the server for the collection.
- *
- * @param {object} [options={}]
- * @returns {Promise}
- */
- more: function( options ) {
- var query = this;
-
- // If there is already a request pending, return early with the Deferred object.
- if ( this._more && 'pending' === this._more.state() ) {
- return this._more;
- }
-
- if ( ! this.hasMore() ) {
- return jQuery.Deferred().resolveWith( this ).promise();
- }
-
- options = options || {};
- options.remove = false;
-
- return this._more = this.fetch( options ).done( function( resp ) {
- if ( _.isEmpty( resp ) || -1 === this.args.posts_per_page || resp.length < this.args.posts_per_page ) {
- query._hasMore = false;
- }
- });
- },
- /**
- * Overrides Backbone.Collection.sync
- * Overrides wp.media.model.Attachments.sync
- *
- * @param {String} method
- * @param {Backbone.Model} model
- * @param {Object} [options={}]
- * @returns {Promise}
- */
- sync: function( method, model, options ) {
- var args, fallback;
-
- // Overload the read method so Attachment.fetch() functions correctly.
- if ( 'read' === method ) {
- options = options || {};
- options.context = this;
- options.data = _.extend( options.data || {}, {
- action: 'query-attachments',
- post_id: wp.media.model.settings.post.id
- });
-
- // Clone the args so manipulation is non-destructive.
- args = _.clone( this.args );
-
- // Determine which page to query.
- if ( -1 !== args.posts_per_page ) {
- args.paged = Math.floor( this.length / args.posts_per_page ) + 1;
- }
-
- options.data.query = args;
- return wp.media.ajax( options );
-
- // Otherwise, fall back to Backbone.sync()
- } else {
- /**
- * Call wp.media.model.Attachments.sync or Backbone.sync
- */
- fallback = Attachments.prototype.sync ? Attachments.prototype : Backbone;
- return fallback.sync.apply( this, arguments );
- }
- }
-}, {
- /**
- * @readonly
- */
- defaultProps: {
- orderby: 'date',
- order: 'DESC'
- },
- /**
- * @readonly
- */
- defaultArgs: {
- posts_per_page: 40
- },
- /**
- * @readonly
- */
- orderby: {
- allowed: [ 'name', 'author', 'date', 'title', 'modified', 'uploadedTo', 'id', 'post__in', 'menuOrder' ],
- /**
- * A map of JavaScript orderby values to their WP_Query equivalents.
- * @type {Object}
- */
- valuemap: {
- 'id': 'ID',
- 'uploadedTo': 'parent',
- 'menuOrder': 'menu_order ID'
- }
- },
- /**
- * A map of JavaScript query properties to their WP_Query equivalents.
- *
- * @readonly
- */
- propmap: {
- 'search': 's',
- 'type': 'post_mime_type',
- 'perPage': 'posts_per_page',
- 'menuOrder': 'menu_order',
- 'uploadedTo': 'post_parent',
- 'status': 'post_status',
- 'include': 'post__in',
- 'exclude': 'post__not_in'
- },
- /**
- * Creates and returns an Attachments Query collection given the properties.
- *
- * Caches query objects and reuses where possible.
- *
- * @static
- * @method
- *
- * @param {object} [props]
- * @param {Object} [props.cache=true] Whether to use the query cache or not.
- * @param {Object} [props.order]
- * @param {Object} [props.orderby]
- * @param {Object} [props.include]
- * @param {Object} [props.exclude]
- * @param {Object} [props.s]
- * @param {Object} [props.post_mime_type]
- * @param {Object} [props.posts_per_page]
- * @param {Object} [props.menu_order]
- * @param {Object} [props.post_parent]
- * @param {Object} [props.post_status]
- * @param {Object} [options]
- *
- * @returns {wp.media.model.Query} A new Attachments Query collection.
- */
- get: (function(){
- /**
- * @static
- * @type Array
- */
- var queries = [];
-
- /**
- * @returns {Query}
- */
- return function( props, options ) {
- var args = {},
- orderby = Query.orderby,
- defaults = Query.defaultProps,
- query,
- cache = !! props.cache || _.isUndefined( props.cache );
-
- // Remove the `query` property. This isn't linked to a query,
- // this *is* the query.
- delete props.query;
- delete props.cache;
-
- // Fill default args.
- _.defaults( props, defaults );
-
- // Normalize the order.
- props.order = props.order.toUpperCase();
- if ( 'DESC' !== props.order && 'ASC' !== props.order ) {
- props.order = defaults.order.toUpperCase();
- }
-
- // Ensure we have a valid orderby value.
- if ( ! _.contains( orderby.allowed, props.orderby ) ) {
- props.orderby = defaults.orderby;
- }
-
- _.each( [ 'include', 'exclude' ], function( prop ) {
- if ( props[ prop ] && ! _.isArray( props[ prop ] ) ) {
- props[ prop ] = [ props[ prop ] ];
- }
- } );
-
- // Generate the query `args` object.
- // Correct any differing property names.
- _.each( props, function( value, prop ) {
- if ( _.isNull( value ) ) {
- return;
- }
-
- args[ Query.propmap[ prop ] || prop ] = value;
- });
-
- // Fill any other default query args.
- _.defaults( args, Query.defaultArgs );
-
- // `props.orderby` does not always map directly to `args.orderby`.
- // Substitute exceptions specified in orderby.keymap.
- args.orderby = orderby.valuemap[ props.orderby ] || props.orderby;
-
- // Search the query cache for a matching query.
- if ( cache ) {
- query = _.find( queries, function( query ) {
- return _.isEqual( query.args, args );
- });
- } else {
- queries = [];
- }
-
- // Otherwise, create a new query and add it to the cache.
- if ( ! query ) {
- query = new Query( [], _.extend( options || {}, {
- props: props,
- args: args
- } ) );
- queries.push( query );
- }
-
- return query;
- };
- }())
-});
-
-module.exports = Query;
-},{"./attachments.js":10}],13:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],10:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * wp.media.model.Selection
- *
- * A selection of attachments.
- *
- * @class
- * @augments wp.media.model.Attachments
- * @augments Backbone.Collection
- */
-var Attachments = require( './attachments.js' ),
- Selection;
-
-Selection = Attachments.extend({
- /**
- * Refresh the `single` model whenever the selection changes.
- * Binds `single` instead of using the context argument to ensure
- * it receives no parameters.
- *
- * @param {Array} [models=[]] Array of models used to populate the collection.
- * @param {Object} [options={}]
- */
- initialize: function( models, options ) {
- /**
- * call 'initialize' directly on the parent class
- */
- Attachments.prototype.initialize.apply( this, arguments );
- this.multiple = options && options.multiple;
-
- this.on( 'add remove reset', _.bind( this.single, this, false ) );
- },
-
- /**
- * If the workflow does not support multi-select, clear out the selection
- * before adding a new attachment to it.
- *
- * @param {Array} models
- * @param {Object} options
- * @returns {wp.media.model.Attachment[]}
- */
- add: function( models, options ) {
- if ( ! this.multiple ) {
- this.remove( this.models );
- }
- /**
- * call 'add' directly on the parent class
- */
- return Attachments.prototype.add.call( this, models, options );
- },
-
- /**
- * Fired when toggling (clicking on) an attachment in the modal.
- *
- * @param {undefined|boolean|wp.media.model.Attachment} model
- *
- * @fires wp.media.model.Selection#selection:single
- * @fires wp.media.model.Selection#selection:unsingle
- *
- * @returns {Backbone.Model}
- */
- single: function( model ) {
- var previous = this._single;
-
- // If a `model` is provided, use it as the single model.
- if ( model ) {
- this._single = model;
- }
- // If the single model isn't in the selection, remove it.
- if ( this._single && ! this.get( this._single.cid ) ) {
- delete this._single;
- }
-
- this._single = this._single || this.last();
-
- // If single has changed, fire an event.
- if ( this._single !== previous ) {
- if ( previous ) {
- previous.trigger( 'selection:unsingle', previous, this );
-
- // If the model was already removed, trigger the collection
- // event manually.
- if ( ! this.get( previous.cid ) ) {
- this.trigger( 'selection:unsingle', previous, this );
- }
- }
- if ( this._single ) {
- this._single.trigger( 'selection:single', this._single, this );
- }
- }
-
- // Return the single model, or the last model as a fallback.
- return this._single;
- }
-});
-
-module.exports = Selection;
-},{"./attachments.js":10}],14:[function(require,module,exports){
-/*globals _ */
-
-/**
</del><span class="cx" style="display: block; padding: 0 10px"> * wp.media.selectionSync
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Sync an attachments selection in a state with another state.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2381,7 +1268,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = selectionSync;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],15:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],11:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2467,7 +1354,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AttachmentCompat;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],16:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],12:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2546,7 +1433,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AttachmentFilters;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],17:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],13:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2638,7 +1525,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = All;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment-filters.js":16}],18:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment-filters.js":12}],14:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2681,7 +1568,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = DateFilter;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment-filters.js":16}],19:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment-filters.js":12}],15:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2742,7 +1629,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Uploaded;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment-filters.js":16}],20:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment-filters.js":12}],16:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3297,7 +2184,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Attachment;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],21:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],17:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3438,7 +2325,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Details;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment.js":20}],22:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment.js":16}],18:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Attachment.Library
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3458,7 +2345,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Library;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment.js":20}],23:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment.js":16}],19:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3759,7 +2646,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Attachments;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./attachment.js":20,"./view.js":55}],24:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./attachment.js":16,"./view.js":51}],20:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4219,7 +3106,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AttachmentsBrowser;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment-compat.js":15,"../attachment-filters/all.js":17,"../attachment-filters/date.js":18,"../attachment-filters/uploaded.js":19,"../attachment/details.js":21,"../attachment/library.js":22,"../attachments.js":23,"../label.js":34,"../search.js":43,"../settings/attachment-display.js":45,"../sidebar.js":46,"../spinner.js":47,"../toolbar.js":48,"../uploader/inline.js":50,"../uploader/status.js":52,"../view.js":55}],25:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment-compat.js":11,"../attachment-filters/all.js":13,"../attachment-filters/date.js":14,"../attachment-filters/uploaded.js":15,"../attachment/details.js":17,"../attachment/library.js":18,"../attachments.js":19,"../label.js":30,"../search.js":39,"../settings/attachment-display.js":41,"../sidebar.js":42,"../spinner.js":43,"../toolbar.js":44,"../uploader/inline.js":46,"../uploader/status.js":48,"../view.js":51}],21:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4258,7 +3145,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AudioDetails;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./media-details":35}],26:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./media-details":31}],22:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4348,7 +3235,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Button;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],27:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],23:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.FocusManager
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4396,7 +3283,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = FocusManager;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],28:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],24:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4569,7 +3456,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> _.extend( Frame.prototype, StateMachine.prototype );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Frame;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../controllers/region.js":5,"../controllers/state-machine.js":6,"../controllers/state.js":7,"./view.js":55}],29:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../controllers/region.js":5,"../controllers/state-machine.js":6,"../controllers/state.js":7,"./view.js":51}],25:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4647,7 +3534,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AudioDetails;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../../controllers/audio-details.js":2,"../../controllers/media-library.js":4,"../audio-details.js":25,"./media-details":30}],30:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../../controllers/audio-details.js":2,"../../controllers/media-library.js":4,"../audio-details.js":21,"./media-details":26}],26:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4665,8 +3552,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> var View = require( '../view.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> Toolbar = require( '../toolbar.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> Select = require( './select.js' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- Selection = require( '../../models/selection.js' ),
- PostMedia = require( '../../models/post-media.js' ),
</del><span class="cx" style="display: block; padding: 0 10px"> l10n = wp.media.view.l10n,
</span><span class="cx" style="display: block; padding: 0 10px"> MediaDetails;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4686,8 +3571,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> this.cancelText = options.cancelText;
</span><span class="cx" style="display: block; padding: 0 10px"> this.addText = options.addText;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- this.media = new PostMedia( options.metadata );
- this.options.selection = new Selection( this.media.attachment, { multiple: false } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ this.media = new wp.media.model.PostMedia( options.metadata );
+ this.options.selection = new wp.media.model.Selection( this.media.attachment, { multiple: false } );
</ins><span class="cx" style="display: block; padding: 0 10px"> Select.prototype.initialize.apply( this, arguments );
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4782,7 +3667,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = MediaDetails;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../../models/post-media.js":11,"../../models/selection.js":13,"../toolbar.js":48,"../view.js":55,"./select.js":31}],31:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../toolbar.js":44,"../view.js":51,"./select.js":27}],27:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4801,8 +3686,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> var MediaFrame = require( '../media-frame.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> Library = require( '../../controllers/library.js' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- AttachmentsModel = require( '../../models/attachments.js' ),
- SelectionModel = require( '../../models/selection.js' ),
</del><span class="cx" style="display: block; padding: 0 10px"> AttachmentsBrowser = require( '../attachments/browser.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> UploaderInline = require( '../uploader/inline.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> ToolbarSelect = require( '../toolbar/select.js' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4838,14 +3721,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> createSelection: function() {
</span><span class="cx" style="display: block; padding: 0 10px"> var selection = this.options.selection;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! (selection instanceof SelectionModel) ) {
- this.options.selection = new SelectionModel( selection, {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! (selection instanceof wp.media.model.Selection) ) {
+ this.options.selection = new wp.media.model.Selection( selection, {
</ins><span class="cx" style="display: block; padding: 0 10px"> multiple: this.options.multiple
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> this._selection = {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- attachments: new AttachmentsModel(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ attachments: new wp.media.model.Attachments(),
</ins><span class="cx" style="display: block; padding: 0 10px"> difference: []
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4959,7 +3842,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Select;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../../controllers/library.js":3,"../../models/attachments.js":10,"../../models/selection.js":13,"../attachments/browser.js":24,"../media-frame.js":36,"../toolbar/select.js":49,"../uploader/inline.js":50}],32:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../../controllers/library.js":3,"../attachments/browser.js":20,"../media-frame.js":32,"../toolbar/select.js":45,"../uploader/inline.js":46}],28:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5097,7 +3980,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = VideoDetails;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../../controllers/media-library.js":4,"../../controllers/video-details.js":8,"../video-details.js":54,"./media-details":30}],33:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../../controllers/media-library.js":4,"../../controllers/video-details.js":8,"../video-details.js":50,"./media-details":26}],29:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Iframe
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5123,7 +4006,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Iframe;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],34:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],30:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @class
</span><span class="cx" style="display: block; padding: 0 10px"> * @augments wp.media.View
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5149,7 +4032,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Label;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],35:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],31:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5301,7 +4184,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = MediaDetails;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./settings/attachment-display.js":45}],36:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./settings/attachment-display.js":41}],32:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5556,7 +4439,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = MediaFrame;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./frame.js":28,"./iframe.js":33,"./menu.js":38,"./modal.js":39,"./router.js":42,"./toolbar.js":48,"./uploader/window.js":53,"./view.js":55}],37:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./frame.js":24,"./iframe.js":29,"./menu.js":34,"./modal.js":35,"./router.js":38,"./toolbar.js":44,"./uploader/window.js":49,"./view.js":51}],33:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5630,7 +4513,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = MenuItem;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],38:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],34:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Menu
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5746,7 +4629,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Menu;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./menu-item.js":37,"./priority-list.js":40}],39:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./menu-item.js":33,"./priority-list.js":36}],35:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5962,7 +4845,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Modal;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./focus-manager.js":27,"./view.js":55}],40:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./focus-manager.js":23,"./view.js":51}],36:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6063,7 +4946,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = PriorityList;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],41:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],37:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.RouterItem
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6089,7 +4972,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = RouterItem;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./menu-item.js":37}],42:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./menu-item.js":33}],38:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Router
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6126,7 +5009,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Router;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./menu.js":38,"./router-item.js":41}],43:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./menu.js":34,"./router-item.js":37}],39:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6176,7 +5059,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Search;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],44:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],40:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6298,7 +5181,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Settings;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],45:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],41:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6393,7 +5276,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AttachmentDisplay;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../settings.js":44}],46:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../settings.js":40}],42:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Sidebar
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6411,7 +5294,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Sidebar;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./priority-list.js":40}],47:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./priority-list.js":36}],43:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6450,7 +5333,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Spinner;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],48:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],44:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals Backbone, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6613,7 +5496,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Toolbar;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./button.js":26,"./priority-list.js":40,"./view.js":55}],49:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./button.js":22,"./priority-list.js":36,"./view.js":51}],45:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6684,7 +5567,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Select;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../toolbar.js":48}],50:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../toolbar.js":44}],46:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6817,7 +5700,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = UploaderInline;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../view.js":55,"./status.js":52}],51:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../view.js":51,"./status.js":48}],47:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6837,7 +5720,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = UploaderStatusError;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../view.js":55}],52:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../view.js":51}],48:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6977,7 +5860,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = UploaderStatus;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../view.js":55,"./status-error.js":51}],53:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../view.js":51,"./status-error.js":47}],49:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7090,7 +5973,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = UploaderWindow;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../view.js":55}],54:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../view.js":51}],50:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7134,7 +6017,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = VideoDetails;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./media-details":35}],55:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./media-details":31}],51:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcwpincludesjsmediacontrollerscollectionaddjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/media/controllers/collection-add.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media/controllers/collection-add.js 2015-02-09 03:58:35 UTC (rev 31378)
+++ trunk/src/wp-includes/js/media/controllers/collection-add.js 2015-02-09 04:13:38 UTC (rev 31379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -33,7 +33,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {string} attributes.type The collection's media type. (e.g. 'video').
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {string} attributes.collectionType The collection type. (e.g. 'playlist').
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-var Selection = require( '../models/selection.js' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+var Selection = wp.media.model.Selection,
</ins><span class="cx" style="display: block; padding: 0 10px"> Library = require( './library.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> CollectionAdd;
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludesjsmediacontrollerscollectioneditjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/media/controllers/collection-edit.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media/controllers/collection-edit.js 2015-02-09 03:58:35 UTC (rev 31378)
+++ trunk/src/wp-includes/js/media/controllers/collection-edit.js 2015-02-09 04:13:38 UTC (rev 31379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -34,8 +34,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {string} attributes.type The collection's media type. (e.g. 'video').
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {string} attributes.collectionType The collection type. (e.g. 'playlist').
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-var Selection = require( '../models/selection.js' ),
- Library = require( './library.js' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+var Library = require( './library.js' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> View = require( '../views/view.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> EditLibraryView = require( '../views/attachment/edit-library.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> l10n = wp.media.view.l10n,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -72,7 +71,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If we haven't been provided a `library`, create a `Selection`.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! this.get('library') ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- this.set( 'library', new Selection() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ this.set( 'library', new wp.media.model.Selection() );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> // The single `Attachment` view to be used in the `Attachments` view.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! this.get('AttachmentView') ) {
</span></span></pre></div>
<a id="trunksrcwpincludesjsmediacontrollersfeaturedimagejs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/media/controllers/featured-image.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media/controllers/featured-image.js 2015-02-09 03:58:35 UTC (rev 31378)
+++ trunk/src/wp-includes/js/media/controllers/featured-image.js 2015-02-09 04:13:38 UTC (rev 31379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -31,7 +31,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {boolean} [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-var Attachment = require( '../models/attachment.js' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+var Attachment = wp.media.model.Attachment,
</ins><span class="cx" style="display: block; padding: 0 10px"> Library = require( './library.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> l10n = wp.media.view.l10n,
</span><span class="cx" style="display: block; padding: 0 10px"> FeaturedImage;
</span></span></pre></div>
<a id="trunksrcwpincludesjsmediacontrollersgalleryaddjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/media/controllers/gallery-add.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media/controllers/gallery-add.js 2015-02-09 03:58:35 UTC (rev 31378)
+++ trunk/src/wp-includes/js/media/controllers/gallery-add.js 2015-02-09 04:13:38 UTC (rev 31379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -29,7 +29,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {boolean} [attributes.syncSelection=false] Whether the Attachments selection should be persisted from the last state.
</span><span class="cx" style="display: block; padding: 0 10px"> * Defaults to false because for this state, because the library of the Edit Gallery state is the selection.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-var Selection = require( '../models/selection.js' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+var Selection = wp.media.model.Selection,
</ins><span class="cx" style="display: block; padding: 0 10px"> Library = require( './library.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> l10n = wp.media.view.l10n,
</span><span class="cx" style="display: block; padding: 0 10px"> GalleryAdd;
</span></span></pre></div>
<a id="trunksrcwpincludesjsmediacontrollersgalleryeditjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/media/controllers/gallery-edit.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media/controllers/gallery-edit.js 2015-02-09 03:58:35 UTC (rev 31378)
+++ trunk/src/wp-includes/js/media/controllers/gallery-edit.js 2015-02-09 04:13:38 UTC (rev 31379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -31,8 +31,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {view} [attributes.AttachmentView] The single `Attachment` view to be used in the `Attachments`.
</span><span class="cx" style="display: block; padding: 0 10px"> * If none supplied, defaults to wp.media.view.Attachment.EditLibrary.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-var Selection = require( '../models/selection.js' ),
- Library = require( './library.js' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+var Library = require( './library.js' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> EditLibraryView = require( '../views/attachment/edit-library.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> GallerySettingsView = require( '../views/settings/gallery.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> l10n = wp.media.view.l10n,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -63,7 +62,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> initialize: function() {
</span><span class="cx" style="display: block; padding: 0 10px"> // If we haven't been provided a `library`, create a `Selection`.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! this.get('library') )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- this.set( 'library', new Selection() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ this.set( 'library', new wp.media.model.Selection() );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // The single `Attachment` view to be used in the `Attachments` view.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! this.get('AttachmentView') )
</span></span></pre></div>
<a id="trunksrcwpincludesjsmediacontrollerslibraryjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/media/controllers/library.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media/controllers/library.js 2015-02-09 03:58:35 UTC (rev 31378)
+++ trunk/src/wp-includes/js/media/controllers/library.js 2015-02-09 04:13:38 UTC (rev 31379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -35,7 +35,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> var selectionSync = require( '../utils/selection-sync.js' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- Selection = require( '../models/selection.js' ),
</del><span class="cx" style="display: block; padding: 0 10px"> State = require( './state.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> l10n = wp.media.view.l10n,
</span><span class="cx" style="display: block; padding: 0 10px"> Library;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -80,7 +79,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> props = _.omit( props, 'orderby', 'query' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- this.set( 'selection', new Selection( null, {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ this.set( 'selection', new wp.media.model.Selection( null, {
</ins><span class="cx" style="display: block; padding: 0 10px"> multiple: this.get('multiple'),
</span><span class="cx" style="display: block; padding: 0 10px"> props: props
</span><span class="cx" style="display: block; padding: 0 10px"> }) );
</span></span></pre></div>
<a id="trunksrcwpincludesjsmediagridjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/media/grid.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media/grid.js 2015-02-09 03:58:35 UTC (rev 31378)
+++ trunk/src/wp-includes/js/media/grid.js 2015-02-09 04:13:38 UTC (rev 31379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -107,7 +107,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EditImage;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../views/toolbar.js":50,"./state.js":6}],3:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../views/toolbar.js":46,"./state.js":6}],3:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, Backbone, getUserSetting, setUserSetting */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -145,7 +145,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> var selectionSync = require( '../utils/selection-sync.js' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- Selection = require( '../models/selection.js' ),
</del><span class="cx" style="display: block; padding: 0 10px"> State = require( './state.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> l10n = wp.media.view.l10n,
</span><span class="cx" style="display: block; padding: 0 10px"> Library;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -190,7 +189,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> props = _.omit( props, 'orderby', 'query' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- this.set( 'selection', new Selection( null, {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ this.set( 'selection', new wp.media.model.Selection( null, {
</ins><span class="cx" style="display: block; padding: 0 10px"> multiple: this.get('multiple'),
</span><span class="cx" style="display: block; padding: 0 10px"> props: props
</span><span class="cx" style="display: block; padding: 0 10px"> }) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -381,7 +380,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> _.extend( Library.prototype, selectionSync );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Library;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../models/selection.js":11,"../utils/selection-sync.js":13,"./state.js":6}],4:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../utils/selection-sync.js":9,"./state.js":6}],4:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -944,1119 +943,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> media.view.DeleteSelectedPermanentlyButton = require( './views/button/delete-selected-permanently.js' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> }(wp));
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./controllers/edit-attachment-metadata.js":1,"./routers/manage.js":12,"./views/attachment/details-two-column.js":20,"./views/button/delete-selected-permanently.js":26,"./views/button/delete-selected.js":27,"./views/button/select-mode-toggle.js":28,"./views/edit-image-details.js":29,"./views/frame/edit-attachments.js":33,"./views/frame/manage.js":34}],8:[function(require,module,exports){
-/*globals jQuery, Backbone, _, wp */
-
-/**
- * wp.media.model.Attachment
- *
- * @class
- * @augments Backbone.Model
- */
-var $ = jQuery,
- Attachment;
-
-Attachment = Backbone.Model.extend({
- /**
- * Triggered when attachment details change
- * Overrides Backbone.Model.sync
- *
- * @param {string} method
- * @param {wp.media.model.Attachment} model
- * @param {Object} [options={}]
- *
- * @returns {Promise}
- */
- sync: function( method, model, options ) {
- // If the attachment does not yet have an `id`, return an instantly
- // rejected promise. Otherwise, all of our requests will fail.
- if ( _.isUndefined( this.id ) ) {
- return $.Deferred().rejectWith( this ).promise();
- }
-
- // Overload the `read` request so Attachment.fetch() functions correctly.
- if ( 'read' === method ) {
- options = options || {};
- options.context = this;
- options.data = _.extend( options.data || {}, {
- action: 'get-attachment',
- id: this.id
- });
- return wp.media.ajax( options );
-
- // Overload the `update` request so properties can be saved.
- } else if ( 'update' === method ) {
- // If we do not have the necessary nonce, fail immeditately.
- if ( ! this.get('nonces') || ! this.get('nonces').update ) {
- return $.Deferred().rejectWith( this ).promise();
- }
-
- options = options || {};
- options.context = this;
-
- // Set the action and ID.
- options.data = _.extend( options.data || {}, {
- action: 'save-attachment',
- id: this.id,
- nonce: this.get('nonces').update,
- post_id: wp.media.model.settings.post.id
- });
-
- // Record the values of the changed attributes.
- if ( model.hasChanged() ) {
- options.data.changes = {};
-
- _.each( model.changed, function( value, key ) {
- options.data.changes[ key ] = this.get( key );
- }, this );
- }
-
- return wp.media.ajax( options );
-
- // Overload the `delete` request so attachments can be removed.
- // This will permanently delete an attachment.
- } else if ( 'delete' === method ) {
- options = options || {};
-
- if ( ! options.wait ) {
- this.destroyed = true;
- }
-
- options.context = this;
- options.data = _.extend( options.data || {}, {
- action: 'delete-post',
- id: this.id,
- _wpnonce: this.get('nonces')['delete']
- });
-
- return wp.media.ajax( options ).done( function() {
- this.destroyed = true;
- }).fail( function() {
- this.destroyed = false;
- });
-
- // Otherwise, fall back to `Backbone.sync()`.
- } else {
- /**
- * Call `sync` directly on Backbone.Model
- */
- return Backbone.Model.prototype.sync.apply( this, arguments );
- }
- },
- /**
- * Convert date strings into Date objects.
- *
- * @param {Object} resp The raw response object, typically returned by fetch()
- * @returns {Object} The modified response object, which is the attributes hash
- * to be set on the model.
- */
- parse: function( resp ) {
- if ( ! resp ) {
- return resp;
- }
-
- resp.date = new Date( resp.date );
- resp.modified = new Date( resp.modified );
- return resp;
- },
- /**
- * @param {Object} data The properties to be saved.
- * @param {Object} options Sync options. e.g. patch, wait, success, error.
- *
- * @this Backbone.Model
- *
- * @returns {Promise}
- */
- saveCompat: function( data, options ) {
- var model = this;
-
- // If we do not have the necessary nonce, fail immeditately.
- if ( ! this.get('nonces') || ! this.get('nonces').update ) {
- return $.Deferred().rejectWith( this ).promise();
- }
-
- return media.post( 'save-attachment-compat', _.defaults({
- id: this.id,
- nonce: this.get('nonces').update,
- post_id: wp.media.model.settings.post.id
- }, data ) ).done( function( resp, status, xhr ) {
- model.set( model.parse( resp, xhr ), options );
- });
- }
-}, {
- /**
- * Create a new model on the static 'all' attachments collection and return it.
- *
- * @static
- * @param {Object} attrs
- * @returns {wp.media.model.Attachment}
- */
- create: function( attrs ) {
- var Attachments = require( './attachments.js' );
- return Attachments.all.push( attrs );
- },
- /**
- * Create a new model on the static 'all' attachments collection and return it.
- *
- * If this function has already been called for the id,
- * it returns the specified attachment.
- *
- * @static
- * @param {string} id A string used to identify a model.
- * @param {Backbone.Model|undefined} attachment
- * @returns {wp.media.model.Attachment}
- */
- get: _.memoize( function( id, attachment ) {
- var Attachments = require( './attachments.js' );
- return Attachments.all.push( attachment || { id: id } );
- })
-});
-
-module.exports = Attachment;
-},{"./attachments.js":9}],9:[function(require,module,exports){
-/*globals jQuery, Backbone, _, wp */
-
-/**
- * wp.media.model.Attachments
- *
- * A collection of attachments.
- *
- * This collection has no persistence with the server without supplying
- * 'options.props.query = true', which will mirror the collection
- * to an Attachments Query collection - @see wp.media.model.Attachments.mirror().
- *
- * @class
- * @augments Backbone.Collection
- *
- * @param {array} [models] Models to initialize with the collection.
- * @param {object} [options] Options hash for the collection.
- * @param {string} [options.props] Options hash for the initial query properties.
- * @param {string} [options.props.order] Initial order (ASC or DESC) for the collection.
- * @param {string} [options.props.orderby] Initial attribute key to order the collection by.
- * @param {string} [options.props.query] Whether the collection is linked to an attachments query.
- * @param {string} [options.observe]
- * @param {string} [options.filters]
- *
- */
-var Attachment = require( './attachment.js' ),
- Attachments;
-
-Attachments = Backbone.Collection.extend({
- /**
- * @type {wp.media.model.Attachment}
- */
- model: Attachment,
- /**
- * @param {Array} [models=[]] Array of models used to populate the collection.
- * @param {Object} [options={}]
- */
- initialize: function( models, options ) {
- options = options || {};
-
- this.props = new Backbone.Model();
- this.filters = options.filters || {};
-
- // Bind default `change` events to the `props` model.
- this.props.on( 'change', this._changeFilteredProps, this );
-
- this.props.on( 'change:order', this._changeOrder, this );
- this.props.on( 'change:orderby', this._changeOrderby, this );
- this.props.on( 'change:query', this._changeQuery, this );
-
- this.props.set( _.defaults( options.props || {} ) );
-
- if ( options.observe ) {
- this.observe( options.observe );
- }
- },
- /**
- * Sort the collection when the order attribute changes.
- *
- * @access private
- */
- _changeOrder: function() {
- if ( this.comparator ) {
- this.sort();
- }
- },
- /**
- * Set the default comparator only when the `orderby` property is set.
- *
- * @access private
- *
- * @param {Backbone.Model} model
- * @param {string} orderby
- */
- _changeOrderby: function( model, orderby ) {
- // If a different comparator is defined, bail.
- if ( this.comparator && this.comparator !== Attachments.comparator ) {
- return;
- }
-
- if ( orderby && 'post__in' !== orderby ) {
- this.comparator = Attachments.comparator;
- } else {
- delete this.comparator;
- }
- },
- /**
- * If the `query` property is set to true, query the server using
- * the `props` values, and sync the results to this collection.
- *
- * @access private
- *
- * @param {Backbone.Model} model
- * @param {Boolean} query
- */
- _changeQuery: function( model, query ) {
- if ( query ) {
- this.props.on( 'change', this._requery, this );
- this._requery();
- } else {
- this.props.off( 'change', this._requery, this );
- }
- },
- /**
- * @access private
- *
- * @param {Backbone.Model} model
- */
- _changeFilteredProps: function( model ) {
- // If this is a query, updating the collection will be handled by
- // `this._requery()`.
- if ( this.props.get('query') ) {
- return;
- }
-
- var changed = _.chain( model.changed ).map( function( t, prop ) {
- var filter = Attachments.filters[ prop ],
- term = model.get( prop );
-
- if ( ! filter ) {
- return;
- }
-
- if ( term && ! this.filters[ prop ] ) {
- this.filters[ prop ] = filter;
- } else if ( ! term && this.filters[ prop ] === filter ) {
- delete this.filters[ prop ];
- } else {
- return;
- }
-
- // Record the change.
- return true;
- }, this ).any().value();
-
- if ( ! changed ) {
- return;
- }
-
- // If no `Attachments` model is provided to source the searches
- // from, then automatically generate a source from the existing
- // models.
- if ( ! this._source ) {
- this._source = new Attachments( this.models );
- }
-
- this.reset( this._source.filter( this.validator, this ) );
- },
-
- validateDestroyed: false,
- /**
- * Checks whether an attachment is valid.
- *
- * @param {wp.media.model.Attachment} attachment
- * @returns {Boolean}
- */
- validator: function( attachment ) {
- if ( ! this.validateDestroyed && attachment.destroyed ) {
- return false;
- }
- return _.all( this.filters, function( filter ) {
- return !! filter.call( this, attachment );
- }, this );
- },
- /**
- * Add or remove an attachment to the collection depending on its validity.
- *
- * @param {wp.media.model.Attachment} attachment
- * @param {Object} options
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- validate: function( attachment, options ) {
- var valid = this.validator( attachment ),
- hasAttachment = !! this.get( attachment.cid );
-
- if ( ! valid && hasAttachment ) {
- this.remove( attachment, options );
- } else if ( valid && ! hasAttachment ) {
- this.add( attachment, options );
- }
-
- return this;
- },
-
- /**
- * Add or remove all attachments from another collection depending on each one's validity.
- *
- * @param {wp.media.model.Attachments} attachments
- * @param {object} [options={}]
- *
- * @fires wp.media.model.Attachments#reset
- *
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- validateAll: function( attachments, options ) {
- options = options || {};
-
- _.each( attachments.models, function( attachment ) {
- this.validate( attachment, { silent: true });
- }, this );
-
- if ( ! options.silent ) {
- this.trigger( 'reset', this, options );
- }
- return this;
- },
- /**
- * Start observing another attachments collection change events
- * and replicate them on this collection.
- *
- * @param {wp.media.model.Attachments} The attachments collection to observe.
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining.
- */
- observe: function( attachments ) {
- this.observers = this.observers || [];
- this.observers.push( attachments );
-
- attachments.on( 'add change remove', this._validateHandler, this );
- attachments.on( 'reset', this._validateAllHandler, this );
- this.validateAll( attachments );
- return this;
- },
- /**
- * Stop replicating collection change events from another attachments collection.
- *
- * @param {wp.media.model.Attachments} The attachments collection to stop observing.
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- unobserve: function( attachments ) {
- if ( attachments ) {
- attachments.off( null, null, this );
- this.observers = _.without( this.observers, attachments );
-
- } else {
- _.each( this.observers, function( attachments ) {
- attachments.off( null, null, this );
- }, this );
- delete this.observers;
- }
-
- return this;
- },
- /**
- * @access private
- *
- * @param {wp.media.model.Attachments} attachment
- * @param {wp.media.model.Attachments} attachments
- * @param {Object} options
- *
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- _validateHandler: function( attachment, attachments, options ) {
- // If we're not mirroring this `attachments` collection,
- // only retain the `silent` option.
- options = attachments === this.mirroring ? options : {
- silent: options && options.silent
- };
-
- return this.validate( attachment, options );
- },
- /**
- * @access private
- *
- * @param {wp.media.model.Attachments} attachments
- * @param {Object} options
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- _validateAllHandler: function( attachments, options ) {
- return this.validateAll( attachments, options );
- },
- /**
- * Start mirroring another attachments collection, clearing out any models already
- * in the collection.
- *
- * @param {wp.media.model.Attachments} The attachments collection to mirror.
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- mirror: function( attachments ) {
- if ( this.mirroring && this.mirroring === attachments ) {
- return this;
- }
-
- this.unmirror();
- this.mirroring = attachments;
-
- // Clear the collection silently. A `reset` event will be fired
- // when `observe()` calls `validateAll()`.
- this.reset( [], { silent: true } );
- this.observe( attachments );
-
- return this;
- },
- /**
- * Stop mirroring another attachments collection.
- */
- unmirror: function() {
- if ( ! this.mirroring ) {
- return;
- }
-
- this.unobserve( this.mirroring );
- delete this.mirroring;
- },
- /**
- * Retrive more attachments from the server for the collection.
- *
- * Only works if the collection is mirroring a Query Attachments collection,
- * and forwards to its `more` method. This collection class doesn't have
- * server persistence by itself.
- *
- * @param {object} options
- * @returns {Promise}
- */
- more: function( options ) {
- var deferred = jQuery.Deferred(),
- mirroring = this.mirroring,
- attachments = this;
-
- if ( ! mirroring || ! mirroring.more ) {
- return deferred.resolveWith( this ).promise();
- }
- // If we're mirroring another collection, forward `more` to
- // the mirrored collection. Account for a race condition by
- // checking if we're still mirroring that collection when
- // the request resolves.
- mirroring.more( options ).done( function() {
- if ( this === attachments.mirroring )
- deferred.resolveWith( this );
- });
-
- return deferred.promise();
- },
- /**
- * Whether there are more attachments that haven't been sync'd from the server
- * that match the collection's query.
- *
- * Only works if the collection is mirroring a Query Attachments collection,
- * and forwards to its `hasMore` method. This collection class doesn't have
- * server persistence by itself.
- *
- * @returns {boolean}
- */
- hasMore: function() {
- return this.mirroring ? this.mirroring.hasMore() : false;
- },
- /**
- * A custom AJAX-response parser.
- *
- * See trac ticket #24753
- *
- * @param {Object|Array} resp The raw response Object/Array.
- * @param {Object} xhr
- * @returns {Array} The array of model attributes to be added to the collection
- */
- parse: function( resp, xhr ) {
- if ( ! _.isArray( resp ) ) {
- resp = [resp];
- }
-
- return _.map( resp, function( attrs ) {
- var id, attachment, newAttributes;
-
- if ( attrs instanceof Backbone.Model ) {
- id = attrs.get( 'id' );
- attrs = attrs.attributes;
- } else {
- id = attrs.id;
- }
-
- attachment = Attachment.get( id );
- newAttributes = attachment.parse( attrs, xhr );
-
- if ( ! _.isEqual( attachment.attributes, newAttributes ) ) {
- attachment.set( newAttributes );
- }
-
- return attachment;
- });
- },
- /**
- * If the collection is a query, create and mirror an Attachments Query collection.
- *
- * @access private
- */
- _requery: function( refresh ) {
- var props, Query;
- if ( this.props.get('query') ) {
- Query = require( './query.js' );
- props = this.props.toJSON();
- props.cache = ( true !== refresh );
- this.mirror( Query.get( props ) );
- }
- },
- /**
- * If this collection is sorted by `menuOrder`, recalculates and saves
- * the menu order to the database.
- *
- * @returns {undefined|Promise}
- */
- saveMenuOrder: function() {
- if ( 'menuOrder' !== this.props.get('orderby') ) {
- return;
- }
-
- // Removes any uploading attachments, updates each attachment's
- // menu order, and returns an object with an { id: menuOrder }
- // mapping to pass to the request.
- var attachments = this.chain().filter( function( attachment ) {
- return ! _.isUndefined( attachment.id );
- }).map( function( attachment, index ) {
- // Indices start at 1.
- index = index + 1;
- attachment.set( 'menuOrder', index );
- return [ attachment.id, index ];
- }).object().value();
-
- if ( _.isEmpty( attachments ) ) {
- return;
- }
-
- return wp.media.post( 'save-attachment-order', {
- nonce: wp.media.model.settings.post.nonce,
- post_id: wp.media.model.settings.post.id,
- attachments: attachments
- });
- }
-}, {
- /**
- * A function to compare two attachment models in an attachments collection.
- *
- * Used as the default comparator for instances of wp.media.model.Attachments
- * and its subclasses. @see wp.media.model.Attachments._changeOrderby().
- *
- * @static
- *
- * @param {Backbone.Model} a
- * @param {Backbone.Model} b
- * @param {Object} options
- * @returns {Number} -1 if the first model should come before the second,
- * 0 if they are of the same rank and
- * 1 if the first model should come after.
- */
- comparator: function( a, b, options ) {
- var key = this.props.get('orderby'),
- order = this.props.get('order') || 'DESC',
- ac = a.cid,
- bc = b.cid;
-
- a = a.get( key );
- b = b.get( key );
-
- if ( 'date' === key || 'modified' === key ) {
- a = a || new Date();
- b = b || new Date();
- }
-
- // If `options.ties` is set, don't enforce the `cid` tiebreaker.
- if ( options && options.ties ) {
- ac = bc = null;
- }
-
- return ( 'DESC' === order ) ? wp.media.compare( a, b, ac, bc ) : wp.media.compare( b, a, bc, ac );
- },
- /**
- * @namespace
- */
- filters: {
- /**
- * @static
- * Note that this client-side searching is *not* equivalent
- * to our server-side searching.
- *
- * @param {wp.media.model.Attachment} attachment
- *
- * @this wp.media.model.Attachments
- *
- * @returns {Boolean}
- */
- search: function( attachment ) {
- if ( ! this.props.get('search') ) {
- return true;
- }
-
- return _.any(['title','filename','description','caption','name'], function( key ) {
- var value = attachment.get( key );
- return value && -1 !== value.search( this.props.get('search') );
- }, this );
- },
- /**
- * @static
- * @param {wp.media.model.Attachment} attachment
- *
- * @this wp.media.model.Attachments
- *
- * @returns {Boolean}
- */
- type: function( attachment ) {
- var type = this.props.get('type');
- return ! type || -1 !== type.indexOf( attachment.get('type') );
- },
- /**
- * @static
- * @param {wp.media.model.Attachment} attachment
- *
- * @this wp.media.model.Attachments
- *
- * @returns {Boolean}
- */
- uploadedTo: function( attachment ) {
- var uploadedTo = this.props.get('uploadedTo');
- if ( _.isUndefined( uploadedTo ) ) {
- return true;
- }
-
- return uploadedTo === attachment.get('uploadedTo');
- },
- /**
- * @static
- * @param {wp.media.model.Attachment} attachment
- *
- * @this wp.media.model.Attachments
- *
- * @returns {Boolean}
- */
- status: function( attachment ) {
- var status = this.props.get('status');
- if ( _.isUndefined( status ) ) {
- return true;
- }
-
- return status === attachment.get('status');
- }
- }
-});
-
-module.exports = Attachments;
-},{"./attachment.js":8,"./query.js":10}],10:[function(require,module,exports){
-/*globals jQuery, _, wp */
-
-/**
- * wp.media.model.Query
- *
- * A collection of attachments that match the supplied query arguments.
- *
- * Note: Do NOT change this.args after the query has been initialized.
- * Things will break.
- *
- * @class
- * @augments wp.media.model.Attachments
- * @augments Backbone.Collection
- *
- * @param {array} [models] Models to initialize with the collection.
- * @param {object} [options] Options hash.
- * @param {object} [options.args] Attachments query arguments.
- * @param {object} [options.args.posts_per_page]
- */
-var Attachments = require( './attachments.js' ),
- Query;
-
-Query = Attachments.extend({
- /**
- * @global wp.Uploader
- *
- * @param {array} [models=[]] Array of initial models to populate the collection.
- * @param {object} [options={}]
- */
- initialize: function( models, options ) {
- var allowed;
-
- options = options || {};
- Attachments.prototype.initialize.apply( this, arguments );
-
- this.args = options.args;
- this._hasMore = true;
- this.created = new Date();
-
- this.filters.order = function( attachment ) {
- var orderby = this.props.get('orderby'),
- order = this.props.get('order');
-
- if ( ! this.comparator ) {
- return true;
- }
-
- // We want any items that can be placed before the last
- // item in the set. If we add any items after the last
- // item, then we can't guarantee the set is complete.
- if ( this.length ) {
- return 1 !== this.comparator( attachment, this.last(), { ties: true });
-
- // Handle the case where there are no items yet and
- // we're sorting for recent items. In that case, we want
- // changes that occurred after we created the query.
- } else if ( 'DESC' === order && ( 'date' === orderby || 'modified' === orderby ) ) {
- return attachment.get( orderby ) >= this.created;
-
- // If we're sorting by menu order and we have no items,
- // accept any items that have the default menu order (0).
- } else if ( 'ASC' === order && 'menuOrder' === orderby ) {
- return attachment.get( orderby ) === 0;
- }
-
- // Otherwise, we don't want any items yet.
- return false;
- };
-
- // Observe the central `wp.Uploader.queue` collection to watch for
- // new matches for the query.
- //
- // Only observe when a limited number of query args are set. There
- // are no filters for other properties, so observing will result in
- // false positives in those queries.
- allowed = [ 's', 'order', 'orderby', 'posts_per_page', 'post_mime_type', 'post_parent' ];
- if ( wp.Uploader && _( this.args ).chain().keys().difference( allowed ).isEmpty().value() ) {
- this.observe( wp.Uploader.queue );
- }
- },
- /**
- * Whether there are more attachments that haven't been sync'd from the server
- * that match the collection's query.
- *
- * @returns {boolean}
- */
- hasMore: function() {
- return this._hasMore;
- },
- /**
- * Fetch more attachments from the server for the collection.
- *
- * @param {object} [options={}]
- * @returns {Promise}
- */
- more: function( options ) {
- var query = this;
-
- // If there is already a request pending, return early with the Deferred object.
- if ( this._more && 'pending' === this._more.state() ) {
- return this._more;
- }
-
- if ( ! this.hasMore() ) {
- return jQuery.Deferred().resolveWith( this ).promise();
- }
-
- options = options || {};
- options.remove = false;
-
- return this._more = this.fetch( options ).done( function( resp ) {
- if ( _.isEmpty( resp ) || -1 === this.args.posts_per_page || resp.length < this.args.posts_per_page ) {
- query._hasMore = false;
- }
- });
- },
- /**
- * Overrides Backbone.Collection.sync
- * Overrides wp.media.model.Attachments.sync
- *
- * @param {String} method
- * @param {Backbone.Model} model
- * @param {Object} [options={}]
- * @returns {Promise}
- */
- sync: function( method, model, options ) {
- var args, fallback;
-
- // Overload the read method so Attachment.fetch() functions correctly.
- if ( 'read' === method ) {
- options = options || {};
- options.context = this;
- options.data = _.extend( options.data || {}, {
- action: 'query-attachments',
- post_id: wp.media.model.settings.post.id
- });
-
- // Clone the args so manipulation is non-destructive.
- args = _.clone( this.args );
-
- // Determine which page to query.
- if ( -1 !== args.posts_per_page ) {
- args.paged = Math.floor( this.length / args.posts_per_page ) + 1;
- }
-
- options.data.query = args;
- return wp.media.ajax( options );
-
- // Otherwise, fall back to Backbone.sync()
- } else {
- /**
- * Call wp.media.model.Attachments.sync or Backbone.sync
- */
- fallback = Attachments.prototype.sync ? Attachments.prototype : Backbone;
- return fallback.sync.apply( this, arguments );
- }
- }
-}, {
- /**
- * @readonly
- */
- defaultProps: {
- orderby: 'date',
- order: 'DESC'
- },
- /**
- * @readonly
- */
- defaultArgs: {
- posts_per_page: 40
- },
- /**
- * @readonly
- */
- orderby: {
- allowed: [ 'name', 'author', 'date', 'title', 'modified', 'uploadedTo', 'id', 'post__in', 'menuOrder' ],
- /**
- * A map of JavaScript orderby values to their WP_Query equivalents.
- * @type {Object}
- */
- valuemap: {
- 'id': 'ID',
- 'uploadedTo': 'parent',
- 'menuOrder': 'menu_order ID'
- }
- },
- /**
- * A map of JavaScript query properties to their WP_Query equivalents.
- *
- * @readonly
- */
- propmap: {
- 'search': 's',
- 'type': 'post_mime_type',
- 'perPage': 'posts_per_page',
- 'menuOrder': 'menu_order',
- 'uploadedTo': 'post_parent',
- 'status': 'post_status',
- 'include': 'post__in',
- 'exclude': 'post__not_in'
- },
- /**
- * Creates and returns an Attachments Query collection given the properties.
- *
- * Caches query objects and reuses where possible.
- *
- * @static
- * @method
- *
- * @param {object} [props]
- * @param {Object} [props.cache=true] Whether to use the query cache or not.
- * @param {Object} [props.order]
- * @param {Object} [props.orderby]
- * @param {Object} [props.include]
- * @param {Object} [props.exclude]
- * @param {Object} [props.s]
- * @param {Object} [props.post_mime_type]
- * @param {Object} [props.posts_per_page]
- * @param {Object} [props.menu_order]
- * @param {Object} [props.post_parent]
- * @param {Object} [props.post_status]
- * @param {Object} [options]
- *
- * @returns {wp.media.model.Query} A new Attachments Query collection.
- */
- get: (function(){
- /**
- * @static
- * @type Array
- */
- var queries = [];
-
- /**
- * @returns {Query}
- */
- return function( props, options ) {
- var args = {},
- orderby = Query.orderby,
- defaults = Query.defaultProps,
- query,
- cache = !! props.cache || _.isUndefined( props.cache );
-
- // Remove the `query` property. This isn't linked to a query,
- // this *is* the query.
- delete props.query;
- delete props.cache;
-
- // Fill default args.
- _.defaults( props, defaults );
-
- // Normalize the order.
- props.order = props.order.toUpperCase();
- if ( 'DESC' !== props.order && 'ASC' !== props.order ) {
- props.order = defaults.order.toUpperCase();
- }
-
- // Ensure we have a valid orderby value.
- if ( ! _.contains( orderby.allowed, props.orderby ) ) {
- props.orderby = defaults.orderby;
- }
-
- _.each( [ 'include', 'exclude' ], function( prop ) {
- if ( props[ prop ] && ! _.isArray( props[ prop ] ) ) {
- props[ prop ] = [ props[ prop ] ];
- }
- } );
-
- // Generate the query `args` object.
- // Correct any differing property names.
- _.each( props, function( value, prop ) {
- if ( _.isNull( value ) ) {
- return;
- }
-
- args[ Query.propmap[ prop ] || prop ] = value;
- });
-
- // Fill any other default query args.
- _.defaults( args, Query.defaultArgs );
-
- // `props.orderby` does not always map directly to `args.orderby`.
- // Substitute exceptions specified in orderby.keymap.
- args.orderby = orderby.valuemap[ props.orderby ] || props.orderby;
-
- // Search the query cache for a matching query.
- if ( cache ) {
- query = _.find( queries, function( query ) {
- return _.isEqual( query.args, args );
- });
- } else {
- queries = [];
- }
-
- // Otherwise, create a new query and add it to the cache.
- if ( ! query ) {
- query = new Query( [], _.extend( options || {}, {
- props: props,
- args: args
- } ) );
- queries.push( query );
- }
-
- return query;
- };
- }())
-});
-
-module.exports = Query;
-},{"./attachments.js":9}],11:[function(require,module,exports){
-/*globals _ */
-
-/**
- * wp.media.model.Selection
- *
- * A selection of attachments.
- *
- * @class
- * @augments wp.media.model.Attachments
- * @augments Backbone.Collection
- */
-var Attachments = require( './attachments.js' ),
- Selection;
-
-Selection = Attachments.extend({
- /**
- * Refresh the `single` model whenever the selection changes.
- * Binds `single` instead of using the context argument to ensure
- * it receives no parameters.
- *
- * @param {Array} [models=[]] Array of models used to populate the collection.
- * @param {Object} [options={}]
- */
- initialize: function( models, options ) {
- /**
- * call 'initialize' directly on the parent class
- */
- Attachments.prototype.initialize.apply( this, arguments );
- this.multiple = options && options.multiple;
-
- this.on( 'add remove reset', _.bind( this.single, this, false ) );
- },
-
- /**
- * If the workflow does not support multi-select, clear out the selection
- * before adding a new attachment to it.
- *
- * @param {Array} models
- * @param {Object} options
- * @returns {wp.media.model.Attachment[]}
- */
- add: function( models, options ) {
- if ( ! this.multiple ) {
- this.remove( this.models );
- }
- /**
- * call 'add' directly on the parent class
- */
- return Attachments.prototype.add.call( this, models, options );
- },
-
- /**
- * Fired when toggling (clicking on) an attachment in the modal.
- *
- * @param {undefined|boolean|wp.media.model.Attachment} model
- *
- * @fires wp.media.model.Selection#selection:single
- * @fires wp.media.model.Selection#selection:unsingle
- *
- * @returns {Backbone.Model}
- */
- single: function( model ) {
- var previous = this._single;
-
- // If a `model` is provided, use it as the single model.
- if ( model ) {
- this._single = model;
- }
- // If the single model isn't in the selection, remove it.
- if ( this._single && ! this.get( this._single.cid ) ) {
- delete this._single;
- }
-
- this._single = this._single || this.last();
-
- // If single has changed, fire an event.
- if ( this._single !== previous ) {
- if ( previous ) {
- previous.trigger( 'selection:unsingle', previous, this );
-
- // If the model was already removed, trigger the collection
- // event manually.
- if ( ! this.get( previous.cid ) ) {
- this.trigger( 'selection:unsingle', previous, this );
- }
- }
- if ( this._single ) {
- this._single.trigger( 'selection:single', this._single, this );
- }
- }
-
- // Return the single model, or the last model as a fallback.
- return this._single;
- }
-});
-
-module.exports = Selection;
-},{"./attachments.js":9}],12:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./controllers/edit-attachment-metadata.js":1,"./routers/manage.js":8,"./views/attachment/details-two-column.js":16,"./views/button/delete-selected-permanently.js":22,"./views/button/delete-selected.js":23,"./views/button/select-mode-toggle.js":24,"./views/edit-image-details.js":25,"./views/frame/edit-attachments.js":29,"./views/frame/manage.js":30}],8:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals jQuery, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2103,7 +990,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Router;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],13:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],9:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2170,7 +1057,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = selectionSync;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],14:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],10:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2256,7 +1143,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AttachmentCompat;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],15:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],11:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2335,7 +1222,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AttachmentFilters;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],16:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],12:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2427,7 +1314,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = All;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment-filters.js":15}],17:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment-filters.js":11}],13:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2470,7 +1357,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = DateFilter;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment-filters.js":15}],18:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment-filters.js":11}],14:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2531,7 +1418,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Uploaded;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment-filters.js":15}],19:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment-filters.js":11}],15:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3086,7 +1973,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Attachment;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],20:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],16:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3129,7 +2016,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = TwoColumn;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../media-details.js":37,"./details.js":21}],21:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../media-details.js":33,"./details.js":17}],17:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3270,7 +2157,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Details;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment.js":19}],22:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment.js":15}],18:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Attachment.Library
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3290,7 +2177,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Library;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment.js":19}],23:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment.js":15}],19:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3591,7 +2478,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Attachments;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./attachment.js":19,"./view.js":55}],24:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./attachment.js":15,"./view.js":51}],20:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4051,7 +2938,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AttachmentsBrowser;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment-compat.js":14,"../attachment-filters/all.js":16,"../attachment-filters/date.js":17,"../attachment-filters/uploaded.js":18,"../attachment/details.js":21,"../attachment/library.js":22,"../attachments.js":23,"../label.js":36,"../search.js":45,"../settings/attachment-display.js":47,"../sidebar.js":48,"../spinner.js":49,"../toolbar.js":50,"../uploader/inline.js":51,"../uploader/status.js":53,"../view.js":55}],25:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment-compat.js":10,"../attachment-filters/all.js":12,"../attachment-filters/date.js":13,"../attachment-filters/uploaded.js":14,"../attachment/details.js":17,"../attachment/library.js":18,"../attachments.js":19,"../label.js":32,"../search.js":41,"../settings/attachment-display.js":43,"../sidebar.js":44,"../spinner.js":45,"../toolbar.js":46,"../uploader/inline.js":47,"../uploader/status.js":49,"../view.js":51}],21:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4141,7 +3028,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Button;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],26:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],22:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * When MEDIA_TRASH is true, a button that handles bulk Delete Permanently logic
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4185,7 +3072,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = DeleteSelectedPermanently;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../button.js":25,"./delete-selected.js":27}],27:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../button.js":21,"./delete-selected.js":23}],23:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4237,7 +3124,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = DeleteSelected;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../button.js":25}],28:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../button.js":21}],24:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> var Button = require( '../button.js' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4293,7 +3180,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = SelectModeToggle;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../button.js":25}],29:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../button.js":21}],25:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> var View = require( './view.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> EditImage = require( './edit-image.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> Details;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4320,7 +3207,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Details;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./edit-image.js":30,"./view.js":55}],30:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./edit-image.js":26,"./view.js":51}],26:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> var View = require( './view.js' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4375,7 +3262,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EditImage;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],31:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],27:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.FocusManager
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4423,7 +3310,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = FocusManager;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],32:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],28:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4596,7 +3483,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> _.extend( Frame.prototype, StateMachine.prototype );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Frame;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../controllers/region.js":4,"../controllers/state-machine.js":5,"../controllers/state.js":6,"./view.js":55}],33:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../controllers/region.js":4,"../controllers/state-machine.js":5,"../controllers/state.js":6,"./view.js":51}],29:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4845,7 +3732,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EditAttachments;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../../controllers/edit-attachment-metadata.js":1,"../../controllers/edit-image.js":2,"../attachment-compat.js":14,"../attachment/details-two-column.js":20,"../edit-image-details.js":29,"../frame.js":32,"../media-frame.js":38,"../modal.js":41}],34:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../../controllers/edit-attachment-metadata.js":1,"../../controllers/edit-image.js":2,"../attachment-compat.js":10,"../attachment/details-two-column.js":16,"../edit-image-details.js":25,"../frame.js":28,"../media-frame.js":34,"../modal.js":37}],30:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5093,7 +3980,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Manage;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../../controllers/library.js":3,"../../routers/manage.js":12,"../attachments/browser.js":24,"../media-frame.js":38,"../uploader/window.js":54}],35:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../../controllers/library.js":3,"../../routers/manage.js":8,"../attachments/browser.js":20,"../media-frame.js":34,"../uploader/window.js":50}],31:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Iframe
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5119,7 +4006,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Iframe;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],36:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],32:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @class
</span><span class="cx" style="display: block; padding: 0 10px"> * @augments wp.media.View
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5145,7 +4032,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Label;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],37:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],33:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5297,7 +4184,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = MediaDetails;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./settings/attachment-display.js":47}],38:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./settings/attachment-display.js":43}],34:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5552,7 +4439,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = MediaFrame;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./frame.js":32,"./iframe.js":35,"./menu.js":40,"./modal.js":41,"./router.js":44,"./toolbar.js":50,"./uploader/window.js":54,"./view.js":55}],39:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./frame.js":28,"./iframe.js":31,"./menu.js":36,"./modal.js":37,"./router.js":40,"./toolbar.js":46,"./uploader/window.js":50,"./view.js":51}],35:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5626,7 +4513,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = MenuItem;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],40:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],36:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Menu
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5742,7 +4629,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Menu;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./menu-item.js":39,"./priority-list.js":42}],41:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./menu-item.js":35,"./priority-list.js":38}],37:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5958,7 +4845,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Modal;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./focus-manager.js":31,"./view.js":55}],42:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./focus-manager.js":27,"./view.js":51}],38:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6059,7 +4946,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = PriorityList;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],43:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],39:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.RouterItem
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6085,7 +4972,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = RouterItem;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./menu-item.js":39}],44:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./menu-item.js":35}],40:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Router
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6122,7 +5009,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Router;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./menu.js":40,"./router-item.js":43}],45:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./menu.js":36,"./router-item.js":39}],41:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6172,7 +5059,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Search;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],46:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],42:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6294,7 +5181,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Settings;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],47:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],43:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6389,7 +5276,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AttachmentDisplay;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../settings.js":46}],48:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../settings.js":42}],44:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Sidebar
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6407,7 +5294,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Sidebar;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./priority-list.js":42}],49:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./priority-list.js":38}],45:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6446,7 +5333,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Spinner;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":55}],50:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":51}],46:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals Backbone, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6609,7 +5496,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Toolbar;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./button.js":25,"./priority-list.js":42,"./view.js":55}],51:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./button.js":21,"./priority-list.js":38,"./view.js":51}],47:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6742,7 +5629,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = UploaderInline;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../view.js":55,"./status.js":53}],52:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../view.js":51,"./status.js":49}],48:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6762,7 +5649,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = UploaderStatusError;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../view.js":55}],53:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../view.js":51}],49:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6902,7 +5789,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = UploaderStatus;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../view.js":55,"./status-error.js":52}],54:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../view.js":51,"./status-error.js":48}],50:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7015,7 +5902,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = UploaderWindow;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../view.js":55}],55:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../view.js":51}],51:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcwpincludesjsmediaviewsframeimagedetailsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/media/views/frame/image-details.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media/views/frame/image-details.js 2015-02-09 03:58:35 UTC (rev 31378)
+++ trunk/src/wp-includes/js/media/views/frame/image-details.js 2015-02-09 04:13:38 UTC (rev 31379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,8 +17,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> var Select = require( './select.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> Toolbar = require( '../toolbar.js' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- PostImage = require( '../../models/post-image.js' ),
- Selection = require( '../../models/selection.js' ),
</del><span class="cx" style="display: block; padding: 0 10px"> ImageDetailsController = require( '../../controllers/image-details.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> ReplaceImageController = require( '../../controllers/replace-image.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> EditImageController = require( '../../controllers/edit-image.js' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,8 +38,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> initialize: function( options ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- this.image = new PostImage( options.metadata );
- this.options.selection = new Selection( this.image.attachment, { multiple: false } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ this.image = new wp.media.model.PostImage( options.metadata );
+ this.options.selection = new wp.media.model.Selection( this.image.attachment, { multiple: false } );
</ins><span class="cx" style="display: block; padding: 0 10px"> Select.prototype.initialize.apply( this, arguments );
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludesjsmediaviewsframemediadetailsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/media/views/frame/media-details.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media/views/frame/media-details.js 2015-02-09 03:58:35 UTC (rev 31378)
+++ trunk/src/wp-includes/js/media/views/frame/media-details.js 2015-02-09 04:13:38 UTC (rev 31379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -15,8 +15,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> var View = require( '../view.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> Toolbar = require( '../toolbar.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> Select = require( './select.js' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- Selection = require( '../../models/selection.js' ),
- PostMedia = require( '../../models/post-media.js' ),
</del><span class="cx" style="display: block; padding: 0 10px"> l10n = wp.media.view.l10n,
</span><span class="cx" style="display: block; padding: 0 10px"> MediaDetails;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -36,8 +34,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> this.cancelText = options.cancelText;
</span><span class="cx" style="display: block; padding: 0 10px"> this.addText = options.addText;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- this.media = new PostMedia( options.metadata );
- this.options.selection = new Selection( this.media.attachment, { multiple: false } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ this.media = new wp.media.model.PostMedia( options.metadata );
+ this.options.selection = new wp.media.model.Selection( this.media.attachment, { multiple: false } );
</ins><span class="cx" style="display: block; padding: 0 10px"> Select.prototype.initialize.apply( this, arguments );
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludesjsmediaviewsframepostjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/media/views/frame/post.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media/views/frame/post.js 2015-02-09 03:58:35 UTC (rev 31378)
+++ trunk/src/wp-includes/js/media/views/frame/post.js 2015-02-09 04:13:38 UTC (rev 31379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -24,7 +24,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ToolbarEmbed = require( '../toolbar/embed.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> PlaylistSettings = require( '../settings/playlist.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> AttachmentsBrowser = require( '../attachments/browser.js' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- SelectionModel = require( '../../models/selection.js' ),
</del><span class="cx" style="display: block; padding: 0 10px"> SelectionView = require( '../selection.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> EmbedController = require( '../../controllers/embed.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> EditImageController = require( '../../controllers/edit-image.js' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -493,7 +492,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> edit = controller.state('gallery-edit'),
</span><span class="cx" style="display: block; padding: 0 10px"> models = selection.where({ type: 'image' });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- edit.set( 'library', new SelectionModel( models, {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ edit.set( 'library', new wp.media.model.Selection( models, {
</ins><span class="cx" style="display: block; padding: 0 10px"> props: selection.props.toJSON(),
</span><span class="cx" style="display: block; padding: 0 10px"> multiple: true
</span><span class="cx" style="display: block; padding: 0 10px"> }) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -523,7 +522,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> edit = controller.state('playlist-edit'),
</span><span class="cx" style="display: block; padding: 0 10px"> models = selection.where({ type: 'audio' });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- edit.set( 'library', new SelectionModel( models, {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ edit.set( 'library', new wp.media.model.Selection( models, {
</ins><span class="cx" style="display: block; padding: 0 10px"> props: selection.props.toJSON(),
</span><span class="cx" style="display: block; padding: 0 10px"> multiple: true
</span><span class="cx" style="display: block; padding: 0 10px"> }) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -553,7 +552,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> edit = controller.state('video-playlist-edit'),
</span><span class="cx" style="display: block; padding: 0 10px"> models = selection.where({ type: 'video' });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- edit.set( 'library', new SelectionModel( models, {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ edit.set( 'library', new wp.media.model.Selection( models, {
</ins><span class="cx" style="display: block; padding: 0 10px"> props: selection.props.toJSON(),
</span><span class="cx" style="display: block; padding: 0 10px"> multiple: true
</span><span class="cx" style="display: block; padding: 0 10px"> }) );
</span></span></pre></div>
<a id="trunksrcwpincludesjsmediaviewsframeselectjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/media/views/frame/select.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media/views/frame/select.js 2015-02-09 03:58:35 UTC (rev 31378)
+++ trunk/src/wp-includes/js/media/views/frame/select.js 2015-02-09 04:13:38 UTC (rev 31379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -16,8 +16,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> var MediaFrame = require( '../media-frame.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> Library = require( '../../controllers/library.js' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- AttachmentsModel = require( '../../models/attachments.js' ),
- SelectionModel = require( '../../models/selection.js' ),
</del><span class="cx" style="display: block; padding: 0 10px"> AttachmentsBrowser = require( '../attachments/browser.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> UploaderInline = require( '../uploader/inline.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> ToolbarSelect = require( '../toolbar/select.js' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -53,14 +51,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> createSelection: function() {
</span><span class="cx" style="display: block; padding: 0 10px"> var selection = this.options.selection;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! (selection instanceof SelectionModel) ) {
- this.options.selection = new SelectionModel( selection, {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! (selection instanceof wp.media.model.Selection) ) {
+ this.options.selection = new wp.media.model.Selection( selection, {
</ins><span class="cx" style="display: block; padding: 0 10px"> multiple: this.options.multiple
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> this._selection = {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- attachments: new AttachmentsModel(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ attachments: new wp.media.model.Attachments(),
</ins><span class="cx" style="display: block; padding: 0 10px"> difference: []
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span></span></pre></div>
<a id="trunksrcwpincludesjsmediaviewsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/media/views.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media/views.js 2015-02-09 03:58:35 UTC (rev 31378)
+++ trunk/src/wp-includes/js/media/views.js 2015-02-09 04:13:38 UTC (rev 31379)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -34,7 +34,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {string} attributes.type The collection's media type. (e.g. 'video').
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {string} attributes.collectionType The collection type. (e.g. 'playlist').
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-var Selection = require( '../models/selection.js' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+var Selection = wp.media.model.Selection,
</ins><span class="cx" style="display: block; padding: 0 10px"> Library = require( './library.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> CollectionAdd;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -100,7 +100,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = CollectionAdd;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../models/selection.js":20,"./library.js":10}],2:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./library.js":10}],2:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, jQuery, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -137,8 +137,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {string} attributes.type The collection's media type. (e.g. 'video').
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {string} attributes.collectionType The collection type. (e.g. 'playlist').
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-var Selection = require( '../models/selection.js' ),
- Library = require( './library.js' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+var Library = require( './library.js' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> View = require( '../views/view.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> EditLibraryView = require( '../views/attachment/edit-library.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> l10n = wp.media.view.l10n,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -175,7 +174,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If we haven't been provided a `library`, create a `Selection`.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! this.get('library') ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- this.set( 'library', new Selection() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ this.set( 'library', new wp.media.model.Selection() );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> // The single `Attachment` view to be used in the `Attachments` view.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! this.get('AttachmentView') ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -264,7 +263,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = CollectionEdit;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../models/selection.js":20,"../views/attachment/edit-library.js":30,"../views/view.js":76,"./library.js":10}],3:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../views/attachment/edit-library.js":25,"../views/view.js":71,"./library.js":10}],3:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -382,7 +381,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Cropper;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../views/cropper.js":39,"../views/toolbar.js":68,"./state.js":15}],4:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../views/cropper.js":34,"../views/toolbar.js":63,"./state.js":15}],4:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -461,7 +460,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EditImage;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../views/toolbar.js":68,"./state.js":15}],5:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../views/toolbar.js":63,"./state.js":15}],5:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -633,7 +632,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {boolean} [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-var Attachment = require( '../models/attachment.js' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+var Attachment = wp.media.model.Attachment,
</ins><span class="cx" style="display: block; padding: 0 10px"> Library = require( './library.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> l10n = wp.media.view.l10n,
</span><span class="cx" style="display: block; padding: 0 10px"> FeaturedImage;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -722,7 +721,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = FeaturedImage;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../models/attachment.js":16,"./library.js":10}],7:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./library.js":10}],7:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -754,7 +753,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {boolean} [attributes.syncSelection=false] Whether the Attachments selection should be persisted from the last state.
</span><span class="cx" style="display: block; padding: 0 10px"> * Defaults to false because for this state, because the library of the Edit Gallery state is the selection.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-var Selection = require( '../models/selection.js' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+var Selection = wp.media.model.Selection,
</ins><span class="cx" style="display: block; padding: 0 10px"> Library = require( './library.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> l10n = wp.media.view.l10n,
</span><span class="cx" style="display: block; padding: 0 10px"> GalleryAdd;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -810,7 +809,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = GalleryAdd;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../models/selection.js":20,"./library.js":10}],8:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./library.js":10}],8:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -844,8 +843,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {view} [attributes.AttachmentView] The single `Attachment` view to be used in the `Attachments`.
</span><span class="cx" style="display: block; padding: 0 10px"> * If none supplied, defaults to wp.media.view.Attachment.EditLibrary.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-var Selection = require( '../models/selection.js' ),
- Library = require( './library.js' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+var Library = require( './library.js' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> EditLibraryView = require( '../views/attachment/edit-library.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> GallerySettingsView = require( '../views/settings/gallery.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> l10n = wp.media.view.l10n,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -876,7 +874,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> initialize: function() {
</span><span class="cx" style="display: block; padding: 0 10px"> // If we haven't been provided a `library`, create a `Selection`.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! this.get('library') )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- this.set( 'library', new Selection() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ this.set( 'library', new wp.media.model.Selection() );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // The single `Attachment` view to be used in the `Attachments` view.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! this.get('AttachmentView') )
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -951,7 +949,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = GalleryEdit;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../models/selection.js":20,"../views/attachment/edit-library.js":30,"../views/settings/gallery.js":64,"./library.js":10}],9:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../views/attachment/edit-library.js":25,"../views/settings/gallery.js":59,"./library.js":10}],9:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1052,7 +1050,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> var selectionSync = require( '../utils/selection-sync.js' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- Selection = require( '../models/selection.js' ),
</del><span class="cx" style="display: block; padding: 0 10px"> State = require( './state.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> l10n = wp.media.view.l10n,
</span><span class="cx" style="display: block; padding: 0 10px"> Library;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1097,7 +1094,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> props = _.omit( props, 'orderby', 'query' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- this.set( 'selection', new Selection( null, {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ this.set( 'selection', new wp.media.model.Selection( null, {
</ins><span class="cx" style="display: block; padding: 0 10px"> multiple: this.get('multiple'),
</span><span class="cx" style="display: block; padding: 0 10px"> props: props
</span><span class="cx" style="display: block; padding: 0 10px"> }) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1288,7 +1285,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> _.extend( Library.prototype, selectionSync );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Library;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../models/selection.js":20,"../utils/selection-sync.js":21,"./state.js":15}],11:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../utils/selection-sync.js":16,"./state.js":15}],11:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1996,1278 +1993,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = State;
</span><span class="cx" style="display: block; padding: 0 10px"> },{}],16:[function(require,module,exports){
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-/*globals jQuery, Backbone, _, wp */
-
-/**
- * wp.media.model.Attachment
- *
- * @class
- * @augments Backbone.Model
- */
-var $ = jQuery,
- Attachment;
-
-Attachment = Backbone.Model.extend({
- /**
- * Triggered when attachment details change
- * Overrides Backbone.Model.sync
- *
- * @param {string} method
- * @param {wp.media.model.Attachment} model
- * @param {Object} [options={}]
- *
- * @returns {Promise}
- */
- sync: function( method, model, options ) {
- // If the attachment does not yet have an `id`, return an instantly
- // rejected promise. Otherwise, all of our requests will fail.
- if ( _.isUndefined( this.id ) ) {
- return $.Deferred().rejectWith( this ).promise();
- }
-
- // Overload the `read` request so Attachment.fetch() functions correctly.
- if ( 'read' === method ) {
- options = options || {};
- options.context = this;
- options.data = _.extend( options.data || {}, {
- action: 'get-attachment',
- id: this.id
- });
- return wp.media.ajax( options );
-
- // Overload the `update` request so properties can be saved.
- } else if ( 'update' === method ) {
- // If we do not have the necessary nonce, fail immeditately.
- if ( ! this.get('nonces') || ! this.get('nonces').update ) {
- return $.Deferred().rejectWith( this ).promise();
- }
-
- options = options || {};
- options.context = this;
-
- // Set the action and ID.
- options.data = _.extend( options.data || {}, {
- action: 'save-attachment',
- id: this.id,
- nonce: this.get('nonces').update,
- post_id: wp.media.model.settings.post.id
- });
-
- // Record the values of the changed attributes.
- if ( model.hasChanged() ) {
- options.data.changes = {};
-
- _.each( model.changed, function( value, key ) {
- options.data.changes[ key ] = this.get( key );
- }, this );
- }
-
- return wp.media.ajax( options );
-
- // Overload the `delete` request so attachments can be removed.
- // This will permanently delete an attachment.
- } else if ( 'delete' === method ) {
- options = options || {};
-
- if ( ! options.wait ) {
- this.destroyed = true;
- }
-
- options.context = this;
- options.data = _.extend( options.data || {}, {
- action: 'delete-post',
- id: this.id,
- _wpnonce: this.get('nonces')['delete']
- });
-
- return wp.media.ajax( options ).done( function() {
- this.destroyed = true;
- }).fail( function() {
- this.destroyed = false;
- });
-
- // Otherwise, fall back to `Backbone.sync()`.
- } else {
- /**
- * Call `sync` directly on Backbone.Model
- */
- return Backbone.Model.prototype.sync.apply( this, arguments );
- }
- },
- /**
- * Convert date strings into Date objects.
- *
- * @param {Object} resp The raw response object, typically returned by fetch()
- * @returns {Object} The modified response object, which is the attributes hash
- * to be set on the model.
- */
- parse: function( resp ) {
- if ( ! resp ) {
- return resp;
- }
-
- resp.date = new Date( resp.date );
- resp.modified = new Date( resp.modified );
- return resp;
- },
- /**
- * @param {Object} data The properties to be saved.
- * @param {Object} options Sync options. e.g. patch, wait, success, error.
- *
- * @this Backbone.Model
- *
- * @returns {Promise}
- */
- saveCompat: function( data, options ) {
- var model = this;
-
- // If we do not have the necessary nonce, fail immeditately.
- if ( ! this.get('nonces') || ! this.get('nonces').update ) {
- return $.Deferred().rejectWith( this ).promise();
- }
-
- return media.post( 'save-attachment-compat', _.defaults({
- id: this.id,
- nonce: this.get('nonces').update,
- post_id: wp.media.model.settings.post.id
- }, data ) ).done( function( resp, status, xhr ) {
- model.set( model.parse( resp, xhr ), options );
- });
- }
-}, {
- /**
- * Create a new model on the static 'all' attachments collection and return it.
- *
- * @static
- * @param {Object} attrs
- * @returns {wp.media.model.Attachment}
- */
- create: function( attrs ) {
- var Attachments = require( './attachments.js' );
- return Attachments.all.push( attrs );
- },
- /**
- * Create a new model on the static 'all' attachments collection and return it.
- *
- * If this function has already been called for the id,
- * it returns the specified attachment.
- *
- * @static
- * @param {string} id A string used to identify a model.
- * @param {Backbone.Model|undefined} attachment
- * @returns {wp.media.model.Attachment}
- */
- get: _.memoize( function( id, attachment ) {
- var Attachments = require( './attachments.js' );
- return Attachments.all.push( attachment || { id: id } );
- })
-});
-
-module.exports = Attachment;
-},{"./attachments.js":17}],17:[function(require,module,exports){
-/*globals jQuery, Backbone, _, wp */
-
-/**
- * wp.media.model.Attachments
- *
- * A collection of attachments.
- *
- * This collection has no persistence with the server without supplying
- * 'options.props.query = true', which will mirror the collection
- * to an Attachments Query collection - @see wp.media.model.Attachments.mirror().
- *
- * @class
- * @augments Backbone.Collection
- *
- * @param {array} [models] Models to initialize with the collection.
- * @param {object} [options] Options hash for the collection.
- * @param {string} [options.props] Options hash for the initial query properties.
- * @param {string} [options.props.order] Initial order (ASC or DESC) for the collection.
- * @param {string} [options.props.orderby] Initial attribute key to order the collection by.
- * @param {string} [options.props.query] Whether the collection is linked to an attachments query.
- * @param {string} [options.observe]
- * @param {string} [options.filters]
- *
- */
-var Attachment = require( './attachment.js' ),
- Attachments;
-
-Attachments = Backbone.Collection.extend({
- /**
- * @type {wp.media.model.Attachment}
- */
- model: Attachment,
- /**
- * @param {Array} [models=[]] Array of models used to populate the collection.
- * @param {Object} [options={}]
- */
- initialize: function( models, options ) {
- options = options || {};
-
- this.props = new Backbone.Model();
- this.filters = options.filters || {};
-
- // Bind default `change` events to the `props` model.
- this.props.on( 'change', this._changeFilteredProps, this );
-
- this.props.on( 'change:order', this._changeOrder, this );
- this.props.on( 'change:orderby', this._changeOrderby, this );
- this.props.on( 'change:query', this._changeQuery, this );
-
- this.props.set( _.defaults( options.props || {} ) );
-
- if ( options.observe ) {
- this.observe( options.observe );
- }
- },
- /**
- * Sort the collection when the order attribute changes.
- *
- * @access private
- */
- _changeOrder: function() {
- if ( this.comparator ) {
- this.sort();
- }
- },
- /**
- * Set the default comparator only when the `orderby` property is set.
- *
- * @access private
- *
- * @param {Backbone.Model} model
- * @param {string} orderby
- */
- _changeOrderby: function( model, orderby ) {
- // If a different comparator is defined, bail.
- if ( this.comparator && this.comparator !== Attachments.comparator ) {
- return;
- }
-
- if ( orderby && 'post__in' !== orderby ) {
- this.comparator = Attachments.comparator;
- } else {
- delete this.comparator;
- }
- },
- /**
- * If the `query` property is set to true, query the server using
- * the `props` values, and sync the results to this collection.
- *
- * @access private
- *
- * @param {Backbone.Model} model
- * @param {Boolean} query
- */
- _changeQuery: function( model, query ) {
- if ( query ) {
- this.props.on( 'change', this._requery, this );
- this._requery();
- } else {
- this.props.off( 'change', this._requery, this );
- }
- },
- /**
- * @access private
- *
- * @param {Backbone.Model} model
- */
- _changeFilteredProps: function( model ) {
- // If this is a query, updating the collection will be handled by
- // `this._requery()`.
- if ( this.props.get('query') ) {
- return;
- }
-
- var changed = _.chain( model.changed ).map( function( t, prop ) {
- var filter = Attachments.filters[ prop ],
- term = model.get( prop );
-
- if ( ! filter ) {
- return;
- }
-
- if ( term && ! this.filters[ prop ] ) {
- this.filters[ prop ] = filter;
- } else if ( ! term && this.filters[ prop ] === filter ) {
- delete this.filters[ prop ];
- } else {
- return;
- }
-
- // Record the change.
- return true;
- }, this ).any().value();
-
- if ( ! changed ) {
- return;
- }
-
- // If no `Attachments` model is provided to source the searches
- // from, then automatically generate a source from the existing
- // models.
- if ( ! this._source ) {
- this._source = new Attachments( this.models );
- }
-
- this.reset( this._source.filter( this.validator, this ) );
- },
-
- validateDestroyed: false,
- /**
- * Checks whether an attachment is valid.
- *
- * @param {wp.media.model.Attachment} attachment
- * @returns {Boolean}
- */
- validator: function( attachment ) {
- if ( ! this.validateDestroyed && attachment.destroyed ) {
- return false;
- }
- return _.all( this.filters, function( filter ) {
- return !! filter.call( this, attachment );
- }, this );
- },
- /**
- * Add or remove an attachment to the collection depending on its validity.
- *
- * @param {wp.media.model.Attachment} attachment
- * @param {Object} options
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- validate: function( attachment, options ) {
- var valid = this.validator( attachment ),
- hasAttachment = !! this.get( attachment.cid );
-
- if ( ! valid && hasAttachment ) {
- this.remove( attachment, options );
- } else if ( valid && ! hasAttachment ) {
- this.add( attachment, options );
- }
-
- return this;
- },
-
- /**
- * Add or remove all attachments from another collection depending on each one's validity.
- *
- * @param {wp.media.model.Attachments} attachments
- * @param {object} [options={}]
- *
- * @fires wp.media.model.Attachments#reset
- *
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- validateAll: function( attachments, options ) {
- options = options || {};
-
- _.each( attachments.models, function( attachment ) {
- this.validate( attachment, { silent: true });
- }, this );
-
- if ( ! options.silent ) {
- this.trigger( 'reset', this, options );
- }
- return this;
- },
- /**
- * Start observing another attachments collection change events
- * and replicate them on this collection.
- *
- * @param {wp.media.model.Attachments} The attachments collection to observe.
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining.
- */
- observe: function( attachments ) {
- this.observers = this.observers || [];
- this.observers.push( attachments );
-
- attachments.on( 'add change remove', this._validateHandler, this );
- attachments.on( 'reset', this._validateAllHandler, this );
- this.validateAll( attachments );
- return this;
- },
- /**
- * Stop replicating collection change events from another attachments collection.
- *
- * @param {wp.media.model.Attachments} The attachments collection to stop observing.
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- unobserve: function( attachments ) {
- if ( attachments ) {
- attachments.off( null, null, this );
- this.observers = _.without( this.observers, attachments );
-
- } else {
- _.each( this.observers, function( attachments ) {
- attachments.off( null, null, this );
- }, this );
- delete this.observers;
- }
-
- return this;
- },
- /**
- * @access private
- *
- * @param {wp.media.model.Attachments} attachment
- * @param {wp.media.model.Attachments} attachments
- * @param {Object} options
- *
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- _validateHandler: function( attachment, attachments, options ) {
- // If we're not mirroring this `attachments` collection,
- // only retain the `silent` option.
- options = attachments === this.mirroring ? options : {
- silent: options && options.silent
- };
-
- return this.validate( attachment, options );
- },
- /**
- * @access private
- *
- * @param {wp.media.model.Attachments} attachments
- * @param {Object} options
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- _validateAllHandler: function( attachments, options ) {
- return this.validateAll( attachments, options );
- },
- /**
- * Start mirroring another attachments collection, clearing out any models already
- * in the collection.
- *
- * @param {wp.media.model.Attachments} The attachments collection to mirror.
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining
- */
- mirror: function( attachments ) {
- if ( this.mirroring && this.mirroring === attachments ) {
- return this;
- }
-
- this.unmirror();
- this.mirroring = attachments;
-
- // Clear the collection silently. A `reset` event will be fired
- // when `observe()` calls `validateAll()`.
- this.reset( [], { silent: true } );
- this.observe( attachments );
-
- return this;
- },
- /**
- * Stop mirroring another attachments collection.
- */
- unmirror: function() {
- if ( ! this.mirroring ) {
- return;
- }
-
- this.unobserve( this.mirroring );
- delete this.mirroring;
- },
- /**
- * Retrive more attachments from the server for the collection.
- *
- * Only works if the collection is mirroring a Query Attachments collection,
- * and forwards to its `more` method. This collection class doesn't have
- * server persistence by itself.
- *
- * @param {object} options
- * @returns {Promise}
- */
- more: function( options ) {
- var deferred = jQuery.Deferred(),
- mirroring = this.mirroring,
- attachments = this;
-
- if ( ! mirroring || ! mirroring.more ) {
- return deferred.resolveWith( this ).promise();
- }
- // If we're mirroring another collection, forward `more` to
- // the mirrored collection. Account for a race condition by
- // checking if we're still mirroring that collection when
- // the request resolves.
- mirroring.more( options ).done( function() {
- if ( this === attachments.mirroring )
- deferred.resolveWith( this );
- });
-
- return deferred.promise();
- },
- /**
- * Whether there are more attachments that haven't been sync'd from the server
- * that match the collection's query.
- *
- * Only works if the collection is mirroring a Query Attachments collection,
- * and forwards to its `hasMore` method. This collection class doesn't have
- * server persistence by itself.
- *
- * @returns {boolean}
- */
- hasMore: function() {
- return this.mirroring ? this.mirroring.hasMore() : false;
- },
- /**
- * A custom AJAX-response parser.
- *
- * See trac ticket #24753
- *
- * @param {Object|Array} resp The raw response Object/Array.
- * @param {Object} xhr
- * @returns {Array} The array of model attributes to be added to the collection
- */
- parse: function( resp, xhr ) {
- if ( ! _.isArray( resp ) ) {
- resp = [resp];
- }
-
- return _.map( resp, function( attrs ) {
- var id, attachment, newAttributes;
-
- if ( attrs instanceof Backbone.Model ) {
- id = attrs.get( 'id' );
- attrs = attrs.attributes;
- } else {
- id = attrs.id;
- }
-
- attachment = Attachment.get( id );
- newAttributes = attachment.parse( attrs, xhr );
-
- if ( ! _.isEqual( attachment.attributes, newAttributes ) ) {
- attachment.set( newAttributes );
- }
-
- return attachment;
- });
- },
- /**
- * If the collection is a query, create and mirror an Attachments Query collection.
- *
- * @access private
- */
- _requery: function( refresh ) {
- var props, Query;
- if ( this.props.get('query') ) {
- Query = require( './query.js' );
- props = this.props.toJSON();
- props.cache = ( true !== refresh );
- this.mirror( Query.get( props ) );
- }
- },
- /**
- * If this collection is sorted by `menuOrder`, recalculates and saves
- * the menu order to the database.
- *
- * @returns {undefined|Promise}
- */
- saveMenuOrder: function() {
- if ( 'menuOrder' !== this.props.get('orderby') ) {
- return;
- }
-
- // Removes any uploading attachments, updates each attachment's
- // menu order, and returns an object with an { id: menuOrder }
- // mapping to pass to the request.
- var attachments = this.chain().filter( function( attachment ) {
- return ! _.isUndefined( attachment.id );
- }).map( function( attachment, index ) {
- // Indices start at 1.
- index = index + 1;
- attachment.set( 'menuOrder', index );
- return [ attachment.id, index ];
- }).object().value();
-
- if ( _.isEmpty( attachments ) ) {
- return;
- }
-
- return wp.media.post( 'save-attachment-order', {
- nonce: wp.media.model.settings.post.nonce,
- post_id: wp.media.model.settings.post.id,
- attachments: attachments
- });
- }
-}, {
- /**
- * A function to compare two attachment models in an attachments collection.
- *
- * Used as the default comparator for instances of wp.media.model.Attachments
- * and its subclasses. @see wp.media.model.Attachments._changeOrderby().
- *
- * @static
- *
- * @param {Backbone.Model} a
- * @param {Backbone.Model} b
- * @param {Object} options
- * @returns {Number} -1 if the first model should come before the second,
- * 0 if they are of the same rank and
- * 1 if the first model should come after.
- */
- comparator: function( a, b, options ) {
- var key = this.props.get('orderby'),
- order = this.props.get('order') || 'DESC',
- ac = a.cid,
- bc = b.cid;
-
- a = a.get( key );
- b = b.get( key );
-
- if ( 'date' === key || 'modified' === key ) {
- a = a || new Date();
- b = b || new Date();
- }
-
- // If `options.ties` is set, don't enforce the `cid` tiebreaker.
- if ( options && options.ties ) {
- ac = bc = null;
- }
-
- return ( 'DESC' === order ) ? wp.media.compare( a, b, ac, bc ) : wp.media.compare( b, a, bc, ac );
- },
- /**
- * @namespace
- */
- filters: {
- /**
- * @static
- * Note that this client-side searching is *not* equivalent
- * to our server-side searching.
- *
- * @param {wp.media.model.Attachment} attachment
- *
- * @this wp.media.model.Attachments
- *
- * @returns {Boolean}
- */
- search: function( attachment ) {
- if ( ! this.props.get('search') ) {
- return true;
- }
-
- return _.any(['title','filename','description','caption','name'], function( key ) {
- var value = attachment.get( key );
- return value && -1 !== value.search( this.props.get('search') );
- }, this );
- },
- /**
- * @static
- * @param {wp.media.model.Attachment} attachment
- *
- * @this wp.media.model.Attachments
- *
- * @returns {Boolean}
- */
- type: function( attachment ) {
- var type = this.props.get('type');
- return ! type || -1 !== type.indexOf( attachment.get('type') );
- },
- /**
- * @static
- * @param {wp.media.model.Attachment} attachment
- *
- * @this wp.media.model.Attachments
- *
- * @returns {Boolean}
- */
- uploadedTo: function( attachment ) {
- var uploadedTo = this.props.get('uploadedTo');
- if ( _.isUndefined( uploadedTo ) ) {
- return true;
- }
-
- return uploadedTo === attachment.get('uploadedTo');
- },
- /**
- * @static
- * @param {wp.media.model.Attachment} attachment
- *
- * @this wp.media.model.Attachments
- *
- * @returns {Boolean}
- */
- status: function( attachment ) {
- var status = this.props.get('status');
- if ( _.isUndefined( status ) ) {
- return true;
- }
-
- return status === attachment.get('status');
- }
- }
-});
-
-module.exports = Attachments;
-},{"./attachment.js":16,"./query.js":19}],18:[function(require,module,exports){
-/*globals jQuery, Backbone */
-
-/**
- * wp.media.model.PostImage
- *
- * An instance of an image that's been embedded into a post.
- *
- * Used in the embedded image attachment display settings modal - @see wp.media.view.MediaFrame.ImageDetails.
- *
- * @class
- * @augments Backbone.Model
- *
- * @param {int} [attributes] Initial model attributes.
- * @param {int} [attributes.attachment_id] ID of the attachment.
- **/
-var Attachment = require( './attachment' ),
- PostImage;
-
-PostImage = Backbone.Model.extend({
-
- initialize: function( attributes ) {
- this.attachment = false;
-
- if ( attributes.attachment_id ) {
- this.attachment = Attachment.get( attributes.attachment_id );
- if ( this.attachment.get( 'url' ) ) {
- this.dfd = jQuery.Deferred();
- this.dfd.resolve();
- } else {
- this.dfd = this.attachment.fetch();
- }
- this.bindAttachmentListeners();
- }
-
- // keep url in sync with changes to the type of link
- this.on( 'change:link', this.updateLinkUrl, this );
- this.on( 'change:size', this.updateSize, this );
-
- this.setLinkTypeFromUrl();
- this.setAspectRatio();
-
- this.set( 'originalUrl', attributes.url );
- },
-
- bindAttachmentListeners: function() {
- this.listenTo( this.attachment, 'sync', this.setLinkTypeFromUrl );
- this.listenTo( this.attachment, 'sync', this.setAspectRatio );
- this.listenTo( this.attachment, 'change', this.updateSize );
- },
-
- changeAttachment: function( attachment, props ) {
- this.stopListening( this.attachment );
- this.attachment = attachment;
- this.bindAttachmentListeners();
-
- this.set( 'attachment_id', this.attachment.get( 'id' ) );
- this.set( 'caption', this.attachment.get( 'caption' ) );
- this.set( 'alt', this.attachment.get( 'alt' ) );
- this.set( 'size', props.get( 'size' ) );
- this.set( 'align', props.get( 'align' ) );
- this.set( 'link', props.get( 'link' ) );
- this.updateLinkUrl();
- this.updateSize();
- },
-
- setLinkTypeFromUrl: function() {
- var linkUrl = this.get( 'linkUrl' ),
- type;
-
- if ( ! linkUrl ) {
- this.set( 'link', 'none' );
- return;
- }
-
- // default to custom if there is a linkUrl
- type = 'custom';
-
- if ( this.attachment ) {
- if ( this.attachment.get( 'url' ) === linkUrl ) {
- type = 'file';
- } else if ( this.attachment.get( 'link' ) === linkUrl ) {
- type = 'post';
- }
- } else {
- if ( this.get( 'url' ) === linkUrl ) {
- type = 'file';
- }
- }
-
- this.set( 'link', type );
- },
-
- updateLinkUrl: function() {
- var link = this.get( 'link' ),
- url;
-
- switch( link ) {
- case 'file':
- if ( this.attachment ) {
- url = this.attachment.get( 'url' );
- } else {
- url = this.get( 'url' );
- }
- this.set( 'linkUrl', url );
- break;
- case 'post':
- this.set( 'linkUrl', this.attachment.get( 'link' ) );
- break;
- case 'none':
- this.set( 'linkUrl', '' );
- break;
- }
- },
-
- updateSize: function() {
- var size;
-
- if ( ! this.attachment ) {
- return;
- }
-
- if ( this.get( 'size' ) === 'custom' ) {
- this.set( 'width', this.get( 'customWidth' ) );
- this.set( 'height', this.get( 'customHeight' ) );
- this.set( 'url', this.get( 'originalUrl' ) );
- return;
- }
-
- size = this.attachment.get( 'sizes' )[ this.get( 'size' ) ];
-
- if ( ! size ) {
- return;
- }
-
- this.set( 'url', size.url );
- this.set( 'width', size.width );
- this.set( 'height', size.height );
- },
-
- setAspectRatio: function() {
- var full;
-
- if ( this.attachment && this.attachment.get( 'sizes' ) ) {
- full = this.attachment.get( 'sizes' ).full;
-
- if ( full ) {
- this.set( 'aspectRatio', full.width / full.height );
- return;
- }
- }
-
- this.set( 'aspectRatio', this.get( 'customWidth' ) / this.get( 'customHeight' ) );
- }
-});
-
-module.exports = PostImage;
-},{"./attachment":16}],19:[function(require,module,exports){
-/*globals jQuery, _, wp */
-
-/**
- * wp.media.model.Query
- *
- * A collection of attachments that match the supplied query arguments.
- *
- * Note: Do NOT change this.args after the query has been initialized.
- * Things will break.
- *
- * @class
- * @augments wp.media.model.Attachments
- * @augments Backbone.Collection
- *
- * @param {array} [models] Models to initialize with the collection.
- * @param {object} [options] Options hash.
- * @param {object} [options.args] Attachments query arguments.
- * @param {object} [options.args.posts_per_page]
- */
-var Attachments = require( './attachments.js' ),
- Query;
-
-Query = Attachments.extend({
- /**
- * @global wp.Uploader
- *
- * @param {array} [models=[]] Array of initial models to populate the collection.
- * @param {object} [options={}]
- */
- initialize: function( models, options ) {
- var allowed;
-
- options = options || {};
- Attachments.prototype.initialize.apply( this, arguments );
-
- this.args = options.args;
- this._hasMore = true;
- this.created = new Date();
-
- this.filters.order = function( attachment ) {
- var orderby = this.props.get('orderby'),
- order = this.props.get('order');
-
- if ( ! this.comparator ) {
- return true;
- }
-
- // We want any items that can be placed before the last
- // item in the set. If we add any items after the last
- // item, then we can't guarantee the set is complete.
- if ( this.length ) {
- return 1 !== this.comparator( attachment, this.last(), { ties: true });
-
- // Handle the case where there are no items yet and
- // we're sorting for recent items. In that case, we want
- // changes that occurred after we created the query.
- } else if ( 'DESC' === order && ( 'date' === orderby || 'modified' === orderby ) ) {
- return attachment.get( orderby ) >= this.created;
-
- // If we're sorting by menu order and we have no items,
- // accept any items that have the default menu order (0).
- } else if ( 'ASC' === order && 'menuOrder' === orderby ) {
- return attachment.get( orderby ) === 0;
- }
-
- // Otherwise, we don't want any items yet.
- return false;
- };
-
- // Observe the central `wp.Uploader.queue` collection to watch for
- // new matches for the query.
- //
- // Only observe when a limited number of query args are set. There
- // are no filters for other properties, so observing will result in
- // false positives in those queries.
- allowed = [ 's', 'order', 'orderby', 'posts_per_page', 'post_mime_type', 'post_parent' ];
- if ( wp.Uploader && _( this.args ).chain().keys().difference( allowed ).isEmpty().value() ) {
- this.observe( wp.Uploader.queue );
- }
- },
- /**
- * Whether there are more attachments that haven't been sync'd from the server
- * that match the collection's query.
- *
- * @returns {boolean}
- */
- hasMore: function() {
- return this._hasMore;
- },
- /**
- * Fetch more attachments from the server for the collection.
- *
- * @param {object} [options={}]
- * @returns {Promise}
- */
- more: function( options ) {
- var query = this;
-
- // If there is already a request pending, return early with the Deferred object.
- if ( this._more && 'pending' === this._more.state() ) {
- return this._more;
- }
-
- if ( ! this.hasMore() ) {
- return jQuery.Deferred().resolveWith( this ).promise();
- }
-
- options = options || {};
- options.remove = false;
-
- return this._more = this.fetch( options ).done( function( resp ) {
- if ( _.isEmpty( resp ) || -1 === this.args.posts_per_page || resp.length < this.args.posts_per_page ) {
- query._hasMore = false;
- }
- });
- },
- /**
- * Overrides Backbone.Collection.sync
- * Overrides wp.media.model.Attachments.sync
- *
- * @param {String} method
- * @param {Backbone.Model} model
- * @param {Object} [options={}]
- * @returns {Promise}
- */
- sync: function( method, model, options ) {
- var args, fallback;
-
- // Overload the read method so Attachment.fetch() functions correctly.
- if ( 'read' === method ) {
- options = options || {};
- options.context = this;
- options.data = _.extend( options.data || {}, {
- action: 'query-attachments',
- post_id: wp.media.model.settings.post.id
- });
-
- // Clone the args so manipulation is non-destructive.
- args = _.clone( this.args );
-
- // Determine which page to query.
- if ( -1 !== args.posts_per_page ) {
- args.paged = Math.floor( this.length / args.posts_per_page ) + 1;
- }
-
- options.data.query = args;
- return wp.media.ajax( options );
-
- // Otherwise, fall back to Backbone.sync()
- } else {
- /**
- * Call wp.media.model.Attachments.sync or Backbone.sync
- */
- fallback = Attachments.prototype.sync ? Attachments.prototype : Backbone;
- return fallback.sync.apply( this, arguments );
- }
- }
-}, {
- /**
- * @readonly
- */
- defaultProps: {
- orderby: 'date',
- order: 'DESC'
- },
- /**
- * @readonly
- */
- defaultArgs: {
- posts_per_page: 40
- },
- /**
- * @readonly
- */
- orderby: {
- allowed: [ 'name', 'author', 'date', 'title', 'modified', 'uploadedTo', 'id', 'post__in', 'menuOrder' ],
- /**
- * A map of JavaScript orderby values to their WP_Query equivalents.
- * @type {Object}
- */
- valuemap: {
- 'id': 'ID',
- 'uploadedTo': 'parent',
- 'menuOrder': 'menu_order ID'
- }
- },
- /**
- * A map of JavaScript query properties to their WP_Query equivalents.
- *
- * @readonly
- */
- propmap: {
- 'search': 's',
- 'type': 'post_mime_type',
- 'perPage': 'posts_per_page',
- 'menuOrder': 'menu_order',
- 'uploadedTo': 'post_parent',
- 'status': 'post_status',
- 'include': 'post__in',
- 'exclude': 'post__not_in'
- },
- /**
- * Creates and returns an Attachments Query collection given the properties.
- *
- * Caches query objects and reuses where possible.
- *
- * @static
- * @method
- *
- * @param {object} [props]
- * @param {Object} [props.cache=true] Whether to use the query cache or not.
- * @param {Object} [props.order]
- * @param {Object} [props.orderby]
- * @param {Object} [props.include]
- * @param {Object} [props.exclude]
- * @param {Object} [props.s]
- * @param {Object} [props.post_mime_type]
- * @param {Object} [props.posts_per_page]
- * @param {Object} [props.menu_order]
- * @param {Object} [props.post_parent]
- * @param {Object} [props.post_status]
- * @param {Object} [options]
- *
- * @returns {wp.media.model.Query} A new Attachments Query collection.
- */
- get: (function(){
- /**
- * @static
- * @type Array
- */
- var queries = [];
-
- /**
- * @returns {Query}
- */
- return function( props, options ) {
- var args = {},
- orderby = Query.orderby,
- defaults = Query.defaultProps,
- query,
- cache = !! props.cache || _.isUndefined( props.cache );
-
- // Remove the `query` property. This isn't linked to a query,
- // this *is* the query.
- delete props.query;
- delete props.cache;
-
- // Fill default args.
- _.defaults( props, defaults );
-
- // Normalize the order.
- props.order = props.order.toUpperCase();
- if ( 'DESC' !== props.order && 'ASC' !== props.order ) {
- props.order = defaults.order.toUpperCase();
- }
-
- // Ensure we have a valid orderby value.
- if ( ! _.contains( orderby.allowed, props.orderby ) ) {
- props.orderby = defaults.orderby;
- }
-
- _.each( [ 'include', 'exclude' ], function( prop ) {
- if ( props[ prop ] && ! _.isArray( props[ prop ] ) ) {
- props[ prop ] = [ props[ prop ] ];
- }
- } );
-
- // Generate the query `args` object.
- // Correct any differing property names.
- _.each( props, function( value, prop ) {
- if ( _.isNull( value ) ) {
- return;
- }
-
- args[ Query.propmap[ prop ] || prop ] = value;
- });
-
- // Fill any other default query args.
- _.defaults( args, Query.defaultArgs );
-
- // `props.orderby` does not always map directly to `args.orderby`.
- // Substitute exceptions specified in orderby.keymap.
- args.orderby = orderby.valuemap[ props.orderby ] || props.orderby;
-
- // Search the query cache for a matching query.
- if ( cache ) {
- query = _.find( queries, function( query ) {
- return _.isEqual( query.args, args );
- });
- } else {
- queries = [];
- }
-
- // Otherwise, create a new query and add it to the cache.
- if ( ! query ) {
- query = new Query( [], _.extend( options || {}, {
- props: props,
- args: args
- } ) );
- queries.push( query );
- }
-
- return query;
- };
- }())
-});
-
-module.exports = Query;
-},{"./attachments.js":17}],20:[function(require,module,exports){
</del><span class="cx" style="display: block; padding: 0 10px"> /*globals _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * wp.media.model.Selection
- *
- * A selection of attachments.
- *
- * @class
- * @augments wp.media.model.Attachments
- * @augments Backbone.Collection
- */
-var Attachments = require( './attachments.js' ),
- Selection;
-
-Selection = Attachments.extend({
- /**
- * Refresh the `single` model whenever the selection changes.
- * Binds `single` instead of using the context argument to ensure
- * it receives no parameters.
- *
- * @param {Array} [models=[]] Array of models used to populate the collection.
- * @param {Object} [options={}]
- */
- initialize: function( models, options ) {
- /**
- * call 'initialize' directly on the parent class
- */
- Attachments.prototype.initialize.apply( this, arguments );
- this.multiple = options && options.multiple;
-
- this.on( 'add remove reset', _.bind( this.single, this, false ) );
- },
-
- /**
- * If the workflow does not support multi-select, clear out the selection
- * before adding a new attachment to it.
- *
- * @param {Array} models
- * @param {Object} options
- * @returns {wp.media.model.Attachment[]}
- */
- add: function( models, options ) {
- if ( ! this.multiple ) {
- this.remove( this.models );
- }
- /**
- * call 'add' directly on the parent class
- */
- return Attachments.prototype.add.call( this, models, options );
- },
-
- /**
- * Fired when toggling (clicking on) an attachment in the modal.
- *
- * @param {undefined|boolean|wp.media.model.Attachment} model
- *
- * @fires wp.media.model.Selection#selection:single
- * @fires wp.media.model.Selection#selection:unsingle
- *
- * @returns {Backbone.Model}
- */
- single: function( model ) {
- var previous = this._single;
-
- // If a `model` is provided, use it as the single model.
- if ( model ) {
- this._single = model;
- }
- // If the single model isn't in the selection, remove it.
- if ( this._single && ! this.get( this._single.cid ) ) {
- delete this._single;
- }
-
- this._single = this._single || this.last();
-
- // If single has changed, fire an event.
- if ( this._single !== previous ) {
- if ( previous ) {
- previous.trigger( 'selection:unsingle', previous, this );
-
- // If the model was already removed, trigger the collection
- // event manually.
- if ( ! this.get( previous.cid ) ) {
- this.trigger( 'selection:unsingle', previous, this );
- }
- }
- if ( this._single ) {
- this._single.trigger( 'selection:single', this._single, this );
- }
- }
-
- // Return the single model, or the last model as a fallback.
- return this._single;
- }
-});
-
-module.exports = Selection;
-},{"./attachments.js":17}],21:[function(require,module,exports){
-/*globals _ */
-
-/**
</del><span class="cx" style="display: block; padding: 0 10px"> * wp.media.selectionSync
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Sync an attachments selection in a state with another state.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3331,7 +2059,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = selectionSync;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],22:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],17:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /* global _wpMediaViewsL10n, confirm, getUserSetting, setUserSetting */
</span><span class="cx" style="display: block; padding: 0 10px"> ( function( $, _ ) {
</span><span class="cx" style="display: block; padding: 0 10px"> var l10n,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3480,7 +2208,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> media.view.Spinner = require( './views/spinner.js' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> }(jQuery, _));
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./controllers/collection-add.js":1,"./controllers/collection-edit.js":2,"./controllers/cropper.js":3,"./controllers/edit-image.js":4,"./controllers/embed.js":5,"./controllers/featured-image.js":6,"./controllers/gallery-add.js":7,"./controllers/gallery-edit.js":8,"./controllers/image-details.js":9,"./controllers/library.js":10,"./controllers/media-library.js":11,"./controllers/region.js":12,"./controllers/replace-image.js":13,"./controllers/state-machine.js":14,"./controllers/state.js":15,"./utils/selection-sync.js":21,"./views/attachment-compat.js":23,"./views/attachment-filters.js":24,"./views/attachment-filters/all.js":25,"./views/attachment-filters/date.js":26,"./views/attachment
-filters/uploaded.js":27,"./views/attachment.js":28,"./views/attachment/details.js":29,"./views/attachment/edit-library.js":30,"./views/attachment/edit-selection.js":31,"./views/attachment/library.js":32,"./views/attachment/selection.js":33,"./views/attachments.js":34,"./views/attachments/browser.js":35,"./views/attachments/selection.js":36,"./views/button-group.js":37,"./views/button.js":38,"./views/cropper.js":39,"./views/edit-image.js":40,"./views/embed.js":41,"./views/embed/image.js":42,"./views/embed/link.js":43,"./views/embed/url.js":44,"./views/focus-manager.js":45,"./views/frame/image-details.js":47,"./views/frame/post.js":48,"./views/frame/select.js":49,"./views/iframe.js":50,"./views/image-details.js":51,"./views/label.js":52,"
./views/media-frame.js":53,"./views/menu-item.js":54,"./views/menu.js":55,"./views/modal.js":56,"./views/priority-list.js":57,"./views/router-item.js":58,"./views/router.js":59,"./views/search.js":60,"./views/selection.js":61,"./views/settings.js":62,"./views/settings/attachment-display.js":63,"./views/settings/gallery.js":64,"./views/settings/playlist.js":65,"./views/sidebar.js":66,"./views/spinner.js":67,"./views/toolbar.js":68,"./views/toolbar/embed.js":69,"./views/toolbar/select.js":70,"./views/uploader/editor.js":71,"./views/uploader/inline.js":72,"./views/uploader/status-error.js":73,"./views/uploader/status.js":74,"./views/uploader/window.js":75,"./views/view.js":76}],23:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./controllers/collection-add.js":1,"./controllers/collection-edit.js":2,"./controllers/cropper.js":3,"./controllers/edit-image.js":4,"./controllers/embed.js":5,"./controllers/featured-image.js":6,"./controllers/gallery-add.js":7,"./controllers/gallery-edit.js":8,"./controllers/image-details.js":9,"./controllers/library.js":10,"./controllers/media-library.js":11,"./controllers/region.js":12,"./controllers/replace-image.js":13,"./controllers/state-machine.js":14,"./controllers/state.js":15,"./utils/selection-sync.js":16,"./views/attachment-compat.js":18,"./views/attachment-filters.js":19,"./views/attachment-filters/all.js":20,"./views/attachment-filters/date.js":21,"./views/attachment-
filters/uploaded.js":22,"./views/attachment.js":23,"./views/attachment/details.js":24,"./views/attachment/edit-library.js":25,"./views/attachment/edit-selection.js":26,"./views/attachment/library.js":27,"./views/attachment/selection.js":28,"./views/attachments.js":29,"./views/attachments/browser.js":30,"./views/attachments/selection.js":31,"./views/button-group.js":32,"./views/button.js":33,"./views/cropper.js":34,"./views/edit-image.js":35,"./views/embed.js":36,"./views/embed/image.js":37,"./views/embed/link.js":38,"./views/embed/url.js":39,"./views/focus-manager.js":40,"./views/frame/image-details.js":42,"./views/frame/post.js":43,"./views/frame/select.js":44,"./views/iframe.js":45,"./views/image-details.js":46,"./views/label.js":47,".
/views/media-frame.js":48,"./views/menu-item.js":49,"./views/menu.js":50,"./views/modal.js":51,"./views/priority-list.js":52,"./views/router-item.js":53,"./views/router.js":54,"./views/search.js":55,"./views/selection.js":56,"./views/settings.js":57,"./views/settings/attachment-display.js":58,"./views/settings/gallery.js":59,"./views/settings/playlist.js":60,"./views/sidebar.js":61,"./views/spinner.js":62,"./views/toolbar.js":63,"./views/toolbar/embed.js":64,"./views/toolbar/select.js":65,"./views/uploader/editor.js":66,"./views/uploader/inline.js":67,"./views/uploader/status-error.js":68,"./views/uploader/status.js":69,"./views/uploader/window.js":70,"./views/view.js":71}],18:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3566,7 +2294,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AttachmentCompat;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":76}],24:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":71}],19:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3645,7 +2373,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AttachmentFilters;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":76}],25:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":71}],20:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3737,7 +2465,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = All;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment-filters.js":24}],26:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment-filters.js":19}],21:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3780,7 +2508,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = DateFilter;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment-filters.js":24}],27:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment-filters.js":19}],22:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3841,7 +2569,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Uploaded;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment-filters.js":24}],28:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment-filters.js":19}],23:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4396,7 +3124,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Attachment;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":76}],29:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":71}],24:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4537,7 +3265,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Details;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment.js":28}],30:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment.js":23}],25:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Attachment.EditLibrary
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4557,7 +3285,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EditLibrary;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment.js":28}],31:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment.js":23}],26:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Attachments.EditSelection
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4578,7 +3306,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EditSelection;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./selection.js":33}],32:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./selection.js":28}],27:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Attachment.Library
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4598,7 +3326,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Library;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment.js":28}],33:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment.js":23}],28:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Attachment.Selection
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4622,7 +3350,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Selection;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment.js":28}],34:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment.js":23}],29:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4923,7 +3651,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Attachments;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./attachment.js":28,"./view.js":76}],35:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./attachment.js":23,"./view.js":71}],30:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5383,7 +4111,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AttachmentsBrowser;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment-compat.js":23,"../attachment-filters/all.js":25,"../attachment-filters/date.js":26,"../attachment-filters/uploaded.js":27,"../attachment/details.js":29,"../attachment/library.js":32,"../attachments.js":34,"../label.js":52,"../search.js":60,"../settings/attachment-display.js":63,"../sidebar.js":66,"../spinner.js":67,"../toolbar.js":68,"../uploader/inline.js":72,"../uploader/status.js":74,"../view.js":76}],36:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment-compat.js":18,"../attachment-filters/all.js":20,"../attachment-filters/date.js":21,"../attachment-filters/uploaded.js":22,"../attachment/details.js":24,"../attachment/library.js":27,"../attachments.js":29,"../label.js":47,"../search.js":55,"../settings/attachment-display.js":58,"../sidebar.js":61,"../spinner.js":62,"../toolbar.js":63,"../uploader/inline.js":67,"../uploader/status.js":69,"../view.js":71}],31:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5415,7 +4143,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Selection;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../attachment/selection.js":33,"../attachments.js":34}],37:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../attachment/selection.js":28,"../attachments.js":29}],32:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5464,7 +4192,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = ButtonGroup;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./button.js":38,"./view.js":76}],38:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./button.js":33,"./view.js":71}],33:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5554,7 +4282,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Button;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":76}],39:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":71}],34:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5623,7 +4351,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Cropper;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./uploader/status-error.js":73,"./uploader/status.js":74,"./view.js":76}],40:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./uploader/status-error.js":68,"./uploader/status.js":69,"./view.js":71}],35:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> var View = require( './view.js' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5678,7 +4406,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EditImage;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":76}],41:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":71}],36:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Embed
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5747,7 +4475,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Embed;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./embed/image.js":42,"./embed/link.js":43,"./embed/url.js":44,"./view.js":76}],42:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./embed/image.js":37,"./embed/link.js":38,"./embed/url.js":39,"./view.js":71}],37:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5781,7 +4509,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EmbedImage;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../settings/attachment-display.js":63}],43:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../settings/attachment-display.js":58}],38:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5849,7 +4577,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EmbedLink;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../settings.js":62}],44:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../settings.js":57}],39:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5931,7 +4659,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EmbedUrl;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../view.js":76}],45:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../view.js":71}],40:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.FocusManager
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5979,7 +4707,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = FocusManager;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":76}],46:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":71}],41:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6152,7 +4880,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> _.extend( Frame.prototype, StateMachine.prototype );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Frame;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../controllers/region.js":12,"../controllers/state-machine.js":14,"../controllers/state.js":15,"./view.js":76}],47:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../controllers/region.js":12,"../controllers/state-machine.js":14,"../controllers/state.js":15,"./view.js":71}],42:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6172,8 +4900,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> var Select = require( './select.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> Toolbar = require( '../toolbar.js' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- PostImage = require( '../../models/post-image.js' ),
- Selection = require( '../../models/selection.js' ),
</del><span class="cx" style="display: block; padding: 0 10px"> ImageDetailsController = require( '../../controllers/image-details.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> ReplaceImageController = require( '../../controllers/replace-image.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> EditImageController = require( '../../controllers/edit-image.js' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6195,8 +4921,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> initialize: function( options ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- this.image = new PostImage( options.metadata );
- this.options.selection = new Selection( this.image.attachment, { multiple: false } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ this.image = new wp.media.model.PostImage( options.metadata );
+ this.options.selection = new wp.media.model.Selection( this.image.attachment, { multiple: false } );
</ins><span class="cx" style="display: block; padding: 0 10px"> Select.prototype.initialize.apply( this, arguments );
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6338,7 +5064,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = ImageDetails;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../../controllers/edit-image.js":4,"../../controllers/image-details.js":9,"../../controllers/replace-image.js":13,"../../models/post-image.js":18,"../../models/selection.js":20,"../edit-image.js":40,"../image-details.js":51,"../toolbar.js":68,"./select.js":49}],48:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../../controllers/edit-image.js":4,"../../controllers/image-details.js":9,"../../controllers/replace-image.js":13,"../edit-image.js":35,"../image-details.js":46,"../toolbar.js":63,"./select.js":44}],43:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6365,7 +5091,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ToolbarEmbed = require( '../toolbar/embed.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> PlaylistSettings = require( '../settings/playlist.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> AttachmentsBrowser = require( '../attachments/browser.js' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- SelectionModel = require( '../../models/selection.js' ),
</del><span class="cx" style="display: block; padding: 0 10px"> SelectionView = require( '../selection.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> EmbedController = require( '../../controllers/embed.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> EditImageController = require( '../../controllers/edit-image.js' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6834,7 +5559,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> edit = controller.state('gallery-edit'),
</span><span class="cx" style="display: block; padding: 0 10px"> models = selection.where({ type: 'image' });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- edit.set( 'library', new SelectionModel( models, {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ edit.set( 'library', new wp.media.model.Selection( models, {
</ins><span class="cx" style="display: block; padding: 0 10px"> props: selection.props.toJSON(),
</span><span class="cx" style="display: block; padding: 0 10px"> multiple: true
</span><span class="cx" style="display: block; padding: 0 10px"> }) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6864,7 +5589,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> edit = controller.state('playlist-edit'),
</span><span class="cx" style="display: block; padding: 0 10px"> models = selection.where({ type: 'audio' });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- edit.set( 'library', new SelectionModel( models, {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ edit.set( 'library', new wp.media.model.Selection( models, {
</ins><span class="cx" style="display: block; padding: 0 10px"> props: selection.props.toJSON(),
</span><span class="cx" style="display: block; padding: 0 10px"> multiple: true
</span><span class="cx" style="display: block; padding: 0 10px"> }) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6894,7 +5619,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> edit = controller.state('video-playlist-edit'),
</span><span class="cx" style="display: block; padding: 0 10px"> models = selection.where({ type: 'video' });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- edit.set( 'library', new SelectionModel( models, {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ edit.set( 'library', new wp.media.model.Selection( models, {
</ins><span class="cx" style="display: block; padding: 0 10px"> props: selection.props.toJSON(),
</span><span class="cx" style="display: block; padding: 0 10px"> multiple: true
</span><span class="cx" style="display: block; padding: 0 10px"> }) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7091,7 +5816,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Post;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../../controllers/collection-add.js":1,"../../controllers/collection-edit.js":2,"../../controllers/edit-image.js":4,"../../controllers/embed.js":5,"../../controllers/featured-image.js":6,"../../controllers/gallery-add.js":7,"../../controllers/gallery-edit.js":8,"../../controllers/library.js":10,"../../models/selection.js":20,"../attachment/edit-selection.js":31,"../attachments/browser.js":35,"../edit-image.js":40,"../embed.js":41,"../selection.js":61,"../settings/playlist.js":65,"../toolbar.js":68,"../toolbar/embed.js":69,"../view.js":76,"./select.js":49}],49:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../../controllers/collection-add.js":1,"../../controllers/collection-edit.js":2,"../../controllers/edit-image.js":4,"../../controllers/embed.js":5,"../../controllers/featured-image.js":6,"../../controllers/gallery-add.js":7,"../../controllers/gallery-edit.js":8,"../../controllers/library.js":10,"../attachment/edit-selection.js":26,"../attachments/browser.js":30,"../edit-image.js":35,"../embed.js":36,"../selection.js":56,"../settings/playlist.js":60,"../toolbar.js":63,"../toolbar/embed.js":64,"../view.js":71,"./select.js":44}],44:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7110,8 +5835,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> var MediaFrame = require( '../media-frame.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> Library = require( '../../controllers/library.js' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- AttachmentsModel = require( '../../models/attachments.js' ),
- SelectionModel = require( '../../models/selection.js' ),
</del><span class="cx" style="display: block; padding: 0 10px"> AttachmentsBrowser = require( '../attachments/browser.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> UploaderInline = require( '../uploader/inline.js' ),
</span><span class="cx" style="display: block; padding: 0 10px"> ToolbarSelect = require( '../toolbar/select.js' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7147,14 +5870,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> createSelection: function() {
</span><span class="cx" style="display: block; padding: 0 10px"> var selection = this.options.selection;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! (selection instanceof SelectionModel) ) {
- this.options.selection = new SelectionModel( selection, {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! (selection instanceof wp.media.model.Selection) ) {
+ this.options.selection = new wp.media.model.Selection( selection, {
</ins><span class="cx" style="display: block; padding: 0 10px"> multiple: this.options.multiple
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> this._selection = {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- attachments: new AttachmentsModel(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ attachments: new wp.media.model.Attachments(),
</ins><span class="cx" style="display: block; padding: 0 10px"> difference: []
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7268,7 +5991,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Select;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../../controllers/library.js":10,"../../models/attachments.js":17,"../../models/selection.js":20,"../attachments/browser.js":35,"../media-frame.js":53,"../toolbar/select.js":70,"../uploader/inline.js":72}],50:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../../controllers/library.js":10,"../attachments/browser.js":30,"../media-frame.js":48,"../toolbar/select.js":65,"../uploader/inline.js":67}],45:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Iframe
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7294,7 +6017,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Iframe;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":76}],51:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":71}],46:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7462,7 +6185,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AttachmentDisplay;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./settings/attachment-display.js":63}],52:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./settings/attachment-display.js":58}],47:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @class
</span><span class="cx" style="display: block; padding: 0 10px"> * @augments wp.media.View
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7488,7 +6211,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Label;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":76}],53:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":71}],48:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7743,7 +6466,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = MediaFrame;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./frame.js":46,"./iframe.js":50,"./menu.js":55,"./modal.js":56,"./router.js":59,"./toolbar.js":68,"./uploader/window.js":75,"./view.js":76}],54:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./frame.js":41,"./iframe.js":45,"./menu.js":50,"./modal.js":51,"./router.js":54,"./toolbar.js":63,"./uploader/window.js":70,"./view.js":71}],49:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7817,7 +6540,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = MenuItem;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":76}],55:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":71}],50:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Menu
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7933,7 +6656,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Menu;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./menu-item.js":54,"./priority-list.js":57}],56:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./menu-item.js":49,"./priority-list.js":52}],51:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8149,7 +6872,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Modal;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./focus-manager.js":45,"./view.js":76}],57:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./focus-manager.js":40,"./view.js":71}],52:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8250,7 +6973,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = PriorityList;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":76}],58:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":71}],53:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.RouterItem
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8276,7 +6999,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = RouterItem;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./menu-item.js":54}],59:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./menu-item.js":49}],54:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Router
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8313,7 +7036,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Router;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./menu.js":55,"./router-item.js":58}],60:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./menu.js":50,"./router-item.js":53}],55:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8363,7 +7086,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Search;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":76}],61:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":71}],56:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8449,7 +7172,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Selection;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./attachments/selection.js":36,"./view.js":76}],62:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./attachments/selection.js":31,"./view.js":71}],57:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8571,7 +7294,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Settings;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":76}],63:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":71}],58:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8666,7 +7389,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AttachmentDisplay;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../settings.js":62}],64:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../settings.js":57}],59:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8687,7 +7410,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Gallery;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../settings.js":62}],65:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../settings.js":57}],60:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8708,7 +7431,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Playlist;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../settings.js":62}],66:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../settings.js":57}],61:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Sidebar
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8726,7 +7449,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Sidebar;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./priority-list.js":57}],67:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./priority-list.js":52}],62:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8765,7 +7488,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Spinner;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./view.js":76}],68:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./view.js":71}],63:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals Backbone, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8928,7 +7651,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Toolbar;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./button.js":38,"./priority-list.js":57,"./view.js":76}],69:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./button.js":33,"./priority-list.js":52,"./view.js":71}],64:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8966,7 +7689,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Embed;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./select.js":70}],70:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./select.js":65}],65:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9037,7 +7760,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Select;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../toolbar.js":68}],71:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../toolbar.js":63}],66:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9259,7 +7982,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EditorUploader;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../view.js":76}],72:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../view.js":71}],67:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9392,7 +8115,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = UploaderInline;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../view.js":76,"./status.js":74}],73:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../view.js":71,"./status.js":69}],68:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9412,7 +8135,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = UploaderStatusError;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../view.js":76}],74:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../view.js":71}],69:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9552,7 +8275,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = UploaderStatus;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../view.js":76,"./status-error.js":73}],75:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../view.js":71,"./status-error.js":68}],70:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, wp, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9665,7 +8388,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = UploaderWindow;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"../view.js":76}],76:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"../view.js":71}],71:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9732,4 +8455,4 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = View;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}]},{},[22]);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}]},{},[17]);
</ins></span></pre>
</div>
</div>
</body>
</html>