mirror of
https://github.com/WordPress/WordPress.git
synced 2024-06-28 07:45:02 +02:00
Media JS files:
* In media manifests, ditch IIFEs and global injection, these get dynamically scoped via Browserify * Remove the `debug` option from `browserify:media` * Add `jshint:media` to `jshint:corejs` * Add a trailing newline to all new module files Props iseulde. See #28510. Built from https://develop.svn.wordpress.org/trunk@31385 git-svn-id: http://core.svn.wordpress.org/trunk@31366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
941075c8ca
commit
b191013198
|
@ -1,14 +1,7 @@
|
|||
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||
/* global wp, _wpMediaViewsL10n, _wpmejsSettings, MediaElementPlayer */
|
||||
|
||||
(function(_) {
|
||||
var media = wp.media,
|
||||
baseSettings = {},
|
||||
l10n = typeof _wpMediaViewsL10n === 'undefined' ? {} : _wpMediaViewsL10n;
|
||||
|
||||
if ( ! _.isUndefined( window._wpmejsSettings ) ) {
|
||||
baseSettings = _wpmejsSettings;
|
||||
}
|
||||
baseSettings = window._wpmejsSettings || {},
|
||||
l10n = window._wpMediaViewsL10n || {};
|
||||
|
||||
/**
|
||||
* @mixin
|
||||
|
@ -133,7 +126,7 @@
|
|||
var content;
|
||||
|
||||
_.each( this.defaults, function( value, key ) {
|
||||
model[ key ] = self.coerce( model, key );
|
||||
model[ key ] = this.coerce( model, key );
|
||||
|
||||
if ( value === model[ key ] ) {
|
||||
delete model[ key ];
|
||||
|
@ -222,10 +215,7 @@
|
|||
media.view.AudioDetails = require( './views/audio-details.js' );
|
||||
media.view.VideoDetails = require( './views/video-details.js' );
|
||||
|
||||
}(_));
|
||||
},{"./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){
|
||||
/*globals wp */
|
||||
|
||||
/**
|
||||
* The controller for the Audio Details state
|
||||
*
|
||||
|
@ -255,9 +245,8 @@ AudioDetails = State.extend({
|
|||
});
|
||||
|
||||
module.exports = AudioDetails;
|
||||
},{"./state.js":7}],3:[function(require,module,exports){
|
||||
/*globals _, wp, Backbone, getUserSetting, setUserSetting */
|
||||
|
||||
},{"./state.js":7}],3:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.Library
|
||||
*
|
||||
|
@ -295,6 +284,8 @@ module.exports = AudioDetails;
|
|||
var selectionSync = require( '../utils/selection-sync.js' ),
|
||||
State = require( './state.js' ),
|
||||
l10n = wp.media.view.l10n,
|
||||
getUserSetting = window.getUserSetting,
|
||||
setUserSetting = window.setUserSetting,
|
||||
Library;
|
||||
|
||||
Library = State.extend({
|
||||
|
@ -329,7 +320,7 @@ Library = State.extend({
|
|||
this.set( 'library', wp.media.query() );
|
||||
}
|
||||
|
||||
if ( ! (selection instanceof Selection) ) {
|
||||
if ( ! ( selection instanceof wp.media.model.Selection ) ) {
|
||||
props = selection;
|
||||
|
||||
if ( ! props ) {
|
||||
|
@ -528,9 +519,8 @@ Library = State.extend({
|
|||
_.extend( Library.prototype, selectionSync );
|
||||
|
||||
module.exports = Library;
|
||||
},{"../utils/selection-sync.js":10,"./state.js":7}],4:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"../utils/selection-sync.js":10,"./state.js":7}],4:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.MediaLibrary
|
||||
*
|
||||
|
@ -579,9 +569,8 @@ MediaLibrary = Library.extend({
|
|||
});
|
||||
|
||||
module.exports = MediaLibrary;
|
||||
},{"./library.js":3}],5:[function(require,module,exports){
|
||||
/*globals _, Backbone */
|
||||
|
||||
},{"./library.js":3}],5:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.Region
|
||||
*
|
||||
|
@ -759,9 +748,8 @@ _.extend( Region.prototype, {
|
|||
});
|
||||
|
||||
module.exports = Region;
|
||||
},{}],6:[function(require,module,exports){
|
||||
/*globals _, Backbone */
|
||||
|
||||
},{}],6:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.StateMachine
|
||||
*
|
||||
|
@ -884,9 +872,8 @@ _.each([ 'on', 'off', 'trigger' ], function( method ) {
|
|||
});
|
||||
|
||||
module.exports = StateMachine;
|
||||
},{}],7:[function(require,module,exports){
|
||||
/*globals _, Backbone */
|
||||
|
||||
},{}],7:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.State
|
||||
*
|
||||
|
@ -1126,9 +1113,8 @@ _.each(['toolbar','content'], function( region ) {
|
|||
});
|
||||
|
||||
module.exports = State;
|
||||
},{}],8:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{}],8:[function(require,module,exports){
|
||||
/**
|
||||
* The controller for the Video Details state
|
||||
*
|
||||
|
@ -1158,9 +1144,8 @@ VideoDetails = State.extend({
|
|||
});
|
||||
|
||||
module.exports = VideoDetails;
|
||||
},{"./state.js":7}],9:[function(require,module,exports){
|
||||
/*globals Backbone, _, wp */
|
||||
|
||||
},{"./state.js":7}],9:[function(require,module,exports){
|
||||
/**
|
||||
* Shared model class for audio and video. Updates the model after
|
||||
* "Add Audio|Video Source" and "Replace Audio|Video" states return
|
||||
|
@ -1199,9 +1184,8 @@ var PostMedia = Backbone.Model.extend({
|
|||
});
|
||||
|
||||
module.exports = PostMedia;
|
||||
},{}],10:[function(require,module,exports){
|
||||
/*globals _ */
|
||||
|
||||
},{}],10:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.selectionSync
|
||||
*
|
||||
|
@ -1266,9 +1250,8 @@ var selectionSync = {
|
|||
};
|
||||
|
||||
module.exports = selectionSync;
|
||||
},{}],11:[function(require,module,exports){
|
||||
/*globals _ */
|
||||
|
||||
},{}],11:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.AttachmentCompat
|
||||
*
|
||||
|
@ -1352,9 +1335,8 @@ AttachmentCompat = View.extend({
|
|||
});
|
||||
|
||||
module.exports = AttachmentCompat;
|
||||
},{"./view.js":51}],12:[function(require,module,exports){
|
||||
/*globals _, jQuery */
|
||||
|
||||
},{"./view.js":51}],12:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.AttachmentFilters
|
||||
*
|
||||
|
@ -1431,9 +1413,8 @@ AttachmentFilters = View.extend({
|
|||
});
|
||||
|
||||
module.exports = AttachmentFilters;
|
||||
},{"./view.js":51}],13:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./view.js":51}],13:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.AttachmentFilters.All
|
||||
*
|
||||
|
@ -1523,9 +1504,8 @@ All = AttachmentFilters.extend({
|
|||
});
|
||||
|
||||
module.exports = All;
|
||||
},{"../attachment-filters.js":12}],14:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"../attachment-filters.js":12}],14:[function(require,module,exports){
|
||||
/**
|
||||
* A filter dropdown for month/dates.
|
||||
*
|
||||
|
@ -1566,9 +1546,8 @@ DateFilter = AttachmentFilters.extend({
|
|||
});
|
||||
|
||||
module.exports = DateFilter;
|
||||
},{"../attachment-filters.js":12}],15:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"../attachment-filters.js":12}],15:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.AttachmentFilters.Uploaded
|
||||
*
|
||||
|
@ -1627,9 +1606,8 @@ Uploaded = AttachmentFilters.extend({
|
|||
});
|
||||
|
||||
module.exports = Uploaded;
|
||||
},{"../attachment-filters.js":12}],16:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"../attachment-filters.js":12}],16:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Attachment
|
||||
*
|
||||
|
@ -2182,9 +2160,8 @@ _.each({
|
|||
});
|
||||
|
||||
module.exports = Attachment;
|
||||
},{"./view.js":51}],17:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./view.js":51}],17:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Attachment.Details
|
||||
*
|
||||
|
@ -2244,7 +2221,7 @@ Details = Attachment.extend({
|
|||
deleteAttachment: function( event ) {
|
||||
event.preventDefault();
|
||||
|
||||
if ( confirm( l10n.warnDelete ) ) {
|
||||
if ( window.confirm( l10n.warnDelete ) ) {
|
||||
this.model.destroy();
|
||||
// Keep focus inside media modal
|
||||
// after image is deleted
|
||||
|
@ -2323,6 +2300,7 @@ Details = Attachment.extend({
|
|||
});
|
||||
|
||||
module.exports = Details;
|
||||
|
||||
},{"../attachment.js":16}],18:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Attachment.Library
|
||||
|
@ -2343,9 +2321,8 @@ Library = Attachment.extend({
|
|||
});
|
||||
|
||||
module.exports = Library;
|
||||
},{"../attachment.js":16}],19:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"../attachment.js":16}],19:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Attachments
|
||||
*
|
||||
|
@ -2618,7 +2595,7 @@ Attachments = View.extend({
|
|||
|
||||
// The scroll event occurs on the document, but the element
|
||||
// that should be checked is the document body.
|
||||
if ( el == document ) {
|
||||
if ( el === document ) {
|
||||
el = document.body;
|
||||
scrollTop = $(document).scrollTop();
|
||||
}
|
||||
|
@ -2644,9 +2621,8 @@ Attachments = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Attachments;
|
||||
},{"./attachment.js":16,"./view.js":51}],20:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"./attachment.js":16,"./view.js":51}],20:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.AttachmentsBrowser
|
||||
*
|
||||
|
@ -2837,13 +2813,13 @@ AttachmentsBrowser = View.extend({
|
|||
return;
|
||||
}
|
||||
|
||||
if ( ! mediaTrash && ! confirm( l10n.warnBulkDelete ) ) {
|
||||
if ( ! mediaTrash && ! window.confirm( l10n.warnBulkDelete ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( mediaTrash &&
|
||||
'trash' !== selection.at( 0 ).get( 'status' ) &&
|
||||
! confirm( l10n.warnBulkTrash ) ) {
|
||||
! window.confirm( l10n.warnBulkTrash ) ) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -2891,7 +2867,7 @@ AttachmentsBrowser = View.extend({
|
|||
click: function() {
|
||||
var removed = [], selection = this.controller.state().get( 'selection' );
|
||||
|
||||
if ( ! selection.length || ! confirm( l10n.warnBulkDelete ) ) {
|
||||
if ( ! selection.length || ! window.confirm( l10n.warnBulkDelete ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3104,9 +3080,8 @@ AttachmentsBrowser = View.extend({
|
|||
});
|
||||
|
||||
module.exports = AttachmentsBrowser;
|
||||
},{"../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){
|
||||
/*globals wp */
|
||||
|
||||
},{"../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){
|
||||
/**
|
||||
* wp.media.view.AudioDetails
|
||||
*
|
||||
|
@ -3143,9 +3118,8 @@ AudioDetails = MediaDetails.extend({
|
|||
});
|
||||
|
||||
module.exports = AudioDetails;
|
||||
},{"./media-details":31}],22:[function(require,module,exports){
|
||||
/*globals _, Backbone */
|
||||
|
||||
},{"./media-details":31}],22:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Button
|
||||
*
|
||||
|
@ -3233,6 +3207,7 @@ Button = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Button;
|
||||
|
||||
},{"./view.js":51}],23:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.FocusManager
|
||||
|
@ -3281,9 +3256,8 @@ FocusManager = View.extend({
|
|||
});
|
||||
|
||||
module.exports = FocusManager;
|
||||
},{"./view.js":51}],24:[function(require,module,exports){
|
||||
/*globals _, Backbone */
|
||||
|
||||
},{"./view.js":51}],24:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Frame
|
||||
*
|
||||
|
@ -3454,9 +3428,8 @@ Frame = View.extend({
|
|||
_.extend( Frame.prototype, StateMachine.prototype );
|
||||
|
||||
module.exports = Frame;
|
||||
},{"../controllers/region.js":5,"../controllers/state-machine.js":6,"../controllers/state.js":7,"./view.js":51}],25:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"../controllers/region.js":5,"../controllers/state-machine.js":6,"../controllers/state.js":7,"./view.js":51}],25:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.MediaFrame.AudioDetails
|
||||
*
|
||||
|
@ -3532,9 +3505,8 @@ AudioDetails = MediaDetails.extend({
|
|||
});
|
||||
|
||||
module.exports = AudioDetails;
|
||||
},{"../../controllers/audio-details.js":2,"../../controllers/media-library.js":4,"../audio-details.js":21,"./media-details":26}],26:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"../../controllers/audio-details.js":2,"../../controllers/media-library.js":4,"../audio-details.js":21,"./media-details":26}],26:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.MediaFrame.MediaDetails
|
||||
*
|
||||
|
@ -3665,9 +3637,8 @@ MediaDetails = Select.extend({
|
|||
});
|
||||
|
||||
module.exports = MediaDetails;
|
||||
},{"../toolbar.js":44,"../view.js":51,"./select.js":27}],27:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"../toolbar.js":44,"../view.js":51,"./select.js":27}],27:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.MediaFrame.Select
|
||||
*
|
||||
|
@ -3840,9 +3811,8 @@ Select = MediaFrame.extend({
|
|||
});
|
||||
|
||||
module.exports = Select;
|
||||
},{"../../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){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"../../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){
|
||||
/**
|
||||
* wp.media.view.MediaFrame.VideoDetails
|
||||
*
|
||||
|
@ -3978,6 +3948,7 @@ VideoDetails = MediaDetails.extend({
|
|||
});
|
||||
|
||||
module.exports = VideoDetails;
|
||||
|
||||
},{"../../controllers/media-library.js":4,"../../controllers/video-details.js":8,"../video-details.js":50,"./media-details":26}],29:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Iframe
|
||||
|
@ -4004,6 +3975,7 @@ Iframe = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Iframe;
|
||||
|
||||
},{"./view.js":51}],30:[function(require,module,exports){
|
||||
/**
|
||||
* @class
|
||||
|
@ -4030,9 +4002,8 @@ Label = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Label;
|
||||
},{"./view.js":51}],31:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"./view.js":51}],31:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.MediaDetails
|
||||
*
|
||||
|
@ -4116,7 +4087,7 @@ MediaDetails = AttachmentDisplay.extend({
|
|||
*/
|
||||
setPlayer : function() {
|
||||
if ( ! this.players.length && this.media ) {
|
||||
this.players.push( new MediaElementPlayer( this.media, this.settings ) );
|
||||
this.players.push( new window.MediaElementPlayer( this.media, this.settings ) );
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -4183,9 +4154,8 @@ MediaDetails = AttachmentDisplay.extend({
|
|||
});
|
||||
|
||||
module.exports = MediaDetails;
|
||||
},{"./settings/attachment-display.js":41}],32:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"./settings/attachment-display.js":41}],32:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.MediaFrame
|
||||
*
|
||||
|
@ -4438,9 +4408,8 @@ _.each(['open','close','attach','detach','escape'], function( method ) {
|
|||
});
|
||||
|
||||
module.exports = MediaFrame;
|
||||
},{"./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){
|
||||
/*globals wp, jQuery */
|
||||
|
||||
},{"./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){
|
||||
/**
|
||||
* wp.media.view.MenuItem
|
||||
*
|
||||
|
@ -4512,6 +4481,7 @@ MenuItem = View.extend({
|
|||
});
|
||||
|
||||
module.exports = MenuItem;
|
||||
|
||||
},{"./view.js":51}],34:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Menu
|
||||
|
@ -4628,9 +4598,8 @@ Menu = PriorityList.extend({
|
|||
});
|
||||
|
||||
module.exports = Menu;
|
||||
},{"./menu-item.js":33,"./priority-list.js":36}],35:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"./menu-item.js":33,"./priority-list.js":36}],35:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Modal
|
||||
*
|
||||
|
@ -4844,9 +4813,8 @@ Modal = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Modal;
|
||||
},{"./focus-manager.js":23,"./view.js":51}],36:[function(require,module,exports){
|
||||
/*globals _, Backbone */
|
||||
|
||||
},{"./focus-manager.js":23,"./view.js":51}],36:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.PriorityList
|
||||
*
|
||||
|
@ -4945,6 +4913,7 @@ PriorityList = View.extend({
|
|||
});
|
||||
|
||||
module.exports = PriorityList;
|
||||
|
||||
},{"./view.js":51}],37:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.RouterItem
|
||||
|
@ -4971,6 +4940,7 @@ RouterItem = MenuItem.extend({
|
|||
});
|
||||
|
||||
module.exports = RouterItem;
|
||||
|
||||
},{"./menu-item.js":33}],38:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Router
|
||||
|
@ -5008,9 +4978,8 @@ Router = Menu.extend({
|
|||
});
|
||||
|
||||
module.exports = Router;
|
||||
},{"./menu.js":34,"./router-item.js":37}],39:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"./menu.js":34,"./router-item.js":37}],39:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Search
|
||||
*
|
||||
|
@ -5058,9 +5027,8 @@ Search = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Search;
|
||||
},{"./view.js":51}],40:[function(require,module,exports){
|
||||
/*globals _, Backbone, jQuery */
|
||||
|
||||
},{"./view.js":51}],40:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Settings
|
||||
*
|
||||
|
@ -5168,7 +5136,7 @@ Settings = View.extend({
|
|||
// If the setting has a corresponding user setting,
|
||||
// update that as well.
|
||||
if ( userSetting = $setting.data('userSetting') ) {
|
||||
setUserSetting( userSetting, value );
|
||||
window.setUserSetting( userSetting, value );
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -5180,9 +5148,8 @@ Settings = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Settings;
|
||||
},{"./view.js":51}],41:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./view.js":51}],41:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Settings.AttachmentDisplay
|
||||
*
|
||||
|
@ -5275,6 +5242,7 @@ AttachmentDisplay = Settings.extend({
|
|||
});
|
||||
|
||||
module.exports = AttachmentDisplay;
|
||||
|
||||
},{"../settings.js":40}],42:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Sidebar
|
||||
|
@ -5293,9 +5261,8 @@ Sidebar = PriorityList.extend({
|
|||
});
|
||||
|
||||
module.exports = Sidebar;
|
||||
},{"./priority-list.js":36}],43:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./priority-list.js":36}],43:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Spinner
|
||||
*
|
||||
|
@ -5332,9 +5299,8 @@ Spinner = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Spinner;
|
||||
},{"./view.js":51}],44:[function(require,module,exports){
|
||||
/*globals Backbone, _ */
|
||||
|
||||
},{"./view.js":51}],44:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Toolbar
|
||||
*
|
||||
|
@ -5495,9 +5461,8 @@ Toolbar = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Toolbar;
|
||||
},{"./button.js":22,"./priority-list.js":36,"./view.js":51}],45:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./button.js":22,"./priority-list.js":36,"./view.js":51}],45:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Toolbar.Select
|
||||
*
|
||||
|
@ -5566,9 +5531,8 @@ Select = Toolbar.extend({
|
|||
});
|
||||
|
||||
module.exports = Select;
|
||||
},{"../toolbar.js":44}],46:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"../toolbar.js":44}],46:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.UploaderInline
|
||||
*
|
||||
|
@ -5699,9 +5663,8 @@ UploaderInline = View.extend({
|
|||
});
|
||||
|
||||
module.exports = UploaderInline;
|
||||
},{"../view.js":51,"./status.js":48}],47:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"../view.js":51,"./status.js":48}],47:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.UploaderStatusError
|
||||
*
|
||||
|
@ -5719,9 +5682,8 @@ UploaderStatusError = View.extend({
|
|||
});
|
||||
|
||||
module.exports = UploaderStatusError;
|
||||
},{"../view.js":51}],48:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"../view.js":51}],48:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.UploaderStatus
|
||||
*
|
||||
|
@ -5859,9 +5821,8 @@ UploaderStatus = View.extend({
|
|||
});
|
||||
|
||||
module.exports = UploaderStatus;
|
||||
},{"../view.js":51,"./status-error.js":47}],49:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"../view.js":51,"./status-error.js":47}],49:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.UploaderWindow
|
||||
*
|
||||
|
@ -5972,9 +5933,8 @@ UploaderWindow = View.extend({
|
|||
});
|
||||
|
||||
module.exports = UploaderWindow;
|
||||
},{"../view.js":51}],50:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"../view.js":51}],50:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.VideoDetails
|
||||
*
|
||||
|
@ -6016,9 +5976,8 @@ VideoDetails = MediaDetails.extend({
|
|||
});
|
||||
|
||||
module.exports = VideoDetails;
|
||||
},{"./media-details":31}],51:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"./media-details":31}],51:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.View
|
||||
*
|
||||
|
@ -6083,4 +6042,5 @@ var View = wp.Backbone.View.extend({
|
|||
});
|
||||
|
||||
module.exports = View;
|
||||
|
||||
},{}]},{},[1]);
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
/* global wp, _wpMediaViewsL10n, _wpmejsSettings, MediaElementPlayer */
|
||||
|
||||
(function(_) {
|
||||
var media = wp.media,
|
||||
baseSettings = {},
|
||||
l10n = typeof _wpMediaViewsL10n === 'undefined' ? {} : _wpMediaViewsL10n;
|
||||
|
||||
if ( ! _.isUndefined( window._wpmejsSettings ) ) {
|
||||
baseSettings = _wpmejsSettings;
|
||||
}
|
||||
baseSettings = window._wpmejsSettings || {},
|
||||
l10n = window._wpMediaViewsL10n || {};
|
||||
|
||||
/**
|
||||
* @mixin
|
||||
|
@ -132,7 +125,7 @@
|
|||
var content;
|
||||
|
||||
_.each( this.defaults, function( value, key ) {
|
||||
model[ key ] = self.coerce( model, key );
|
||||
model[ key ] = this.coerce( model, key );
|
||||
|
||||
if ( value === model[ key ] ) {
|
||||
delete model[ key ];
|
||||
|
@ -220,5 +213,3 @@
|
|||
media.view.MediaDetails = require( './views/media-details.js' );
|
||||
media.view.AudioDetails = require( './views/audio-details.js' );
|
||||
media.view.VideoDetails = require( './views/video-details.js' );
|
||||
|
||||
}(_));
|
4
wp-includes/js/media/audio-video.min.js
vendored
4
wp-includes/js/media/audio-video.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,3 @@
|
|||
/*globals wp */
|
||||
|
||||
/**
|
||||
* The controller for the Audio Details state
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.controller.CollectionAdd
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp, jQuery, Backbone */
|
||||
|
||||
/**
|
||||
* wp.media.controller.CollectionEdit
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp, Backbone */
|
||||
|
||||
/**
|
||||
* wp.media.controller.Cropper
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp */
|
||||
|
||||
/**
|
||||
* wp.media.controller.EditAttachmentMetadata
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.controller.EditImage
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp, jQuery, Backbone */
|
||||
|
||||
/**
|
||||
* wp.media.controller.Embed
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.controller.FeaturedImage
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* A state for selecting more images to add to a gallery.
|
||||
*
|
||||
|
@ -51,8 +49,9 @@ GalleryAdd = Library.extend({
|
|||
*/
|
||||
initialize: function() {
|
||||
// If a library wasn't supplied, create a library of images.
|
||||
if ( ! this.get('library') )
|
||||
if ( ! this.get('library') ) {
|
||||
this.set( 'library', wp.media.query({ type: 'image' }) );
|
||||
}
|
||||
|
||||
Library.prototype.initialize.apply( this, arguments );
|
||||
},
|
||||
|
@ -64,8 +63,9 @@ GalleryAdd = Library.extend({
|
|||
var library = this.get('library'),
|
||||
edit = this.frame.state('gallery-edit').get('library');
|
||||
|
||||
if ( this.editLibrary && this.editLibrary !== edit )
|
||||
if ( this.editLibrary && this.editLibrary !== edit ) {
|
||||
library.unobserve( this.editLibrary );
|
||||
}
|
||||
|
||||
// Accepts attachments that exist in the original library and
|
||||
// that do not exist in gallery's library.
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp, Backbone */
|
||||
|
||||
/**
|
||||
* wp.media.controller.GalleryEdit
|
||||
*
|
||||
|
@ -61,12 +59,15 @@ GalleryEdit = Library.extend({
|
|||
*/
|
||||
initialize: function() {
|
||||
// If we haven't been provided a `library`, create a `Selection`.
|
||||
if ( ! this.get('library') )
|
||||
if ( ! this.get('library') ) {
|
||||
this.set( 'library', new wp.media.model.Selection() );
|
||||
}
|
||||
|
||||
// The single `Attachment` view to be used in the `Attachments` view.
|
||||
if ( ! this.get('AttachmentView') )
|
||||
if ( ! this.get('AttachmentView') ) {
|
||||
this.set( 'AttachmentView', EditLibraryView );
|
||||
}
|
||||
|
||||
Library.prototype.initialize.apply( this, arguments );
|
||||
},
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.controller.ImageDetails
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp, Backbone, getUserSetting, setUserSetting */
|
||||
|
||||
/**
|
||||
* wp.media.controller.Library
|
||||
*
|
||||
|
@ -37,6 +35,8 @@
|
|||
var selectionSync = require( '../utils/selection-sync.js' ),
|
||||
State = require( './state.js' ),
|
||||
l10n = wp.media.view.l10n,
|
||||
getUserSetting = window.getUserSetting,
|
||||
setUserSetting = window.setUserSetting,
|
||||
Library;
|
||||
|
||||
Library = State.extend({
|
||||
|
@ -71,7 +71,7 @@ Library = State.extend({
|
|||
this.set( 'library', wp.media.query() );
|
||||
}
|
||||
|
||||
if ( ! (selection instanceof Selection) ) {
|
||||
if ( ! ( selection instanceof wp.media.model.Selection ) ) {
|
||||
props = selection;
|
||||
|
||||
if ( ! props ) {
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.controller.MediaLibrary
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, Backbone */
|
||||
|
||||
/**
|
||||
* wp.media.controller.Region
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.controller.ReplaceImage
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, Backbone */
|
||||
|
||||
/**
|
||||
* wp.media.controller.StateMachine
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, Backbone */
|
||||
|
||||
/**
|
||||
* wp.media.controller.State
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp */
|
||||
|
||||
/**
|
||||
* The controller for the Video Details state
|
||||
*
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
/**
|
||||
* wp.media.controller.EditAttachmentMetadata
|
||||
*
|
||||
|
@ -28,9 +26,8 @@ EditAttachmentMetadata = State.extend({
|
|||
});
|
||||
|
||||
module.exports = EditAttachmentMetadata;
|
||||
},{"./state.js":6}],2:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./state.js":6}],2:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.EditImage
|
||||
*
|
||||
|
@ -107,9 +104,8 @@ EditImage = State.extend({
|
|||
});
|
||||
|
||||
module.exports = EditImage;
|
||||
},{"../views/toolbar.js":46,"./state.js":6}],3:[function(require,module,exports){
|
||||
/*globals _, wp, Backbone, getUserSetting, setUserSetting */
|
||||
|
||||
},{"../views/toolbar.js":46,"./state.js":6}],3:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.Library
|
||||
*
|
||||
|
@ -147,6 +143,8 @@ module.exports = EditImage;
|
|||
var selectionSync = require( '../utils/selection-sync.js' ),
|
||||
State = require( './state.js' ),
|
||||
l10n = wp.media.view.l10n,
|
||||
getUserSetting = window.getUserSetting,
|
||||
setUserSetting = window.setUserSetting,
|
||||
Library;
|
||||
|
||||
Library = State.extend({
|
||||
|
@ -181,7 +179,7 @@ Library = State.extend({
|
|||
this.set( 'library', wp.media.query() );
|
||||
}
|
||||
|
||||
if ( ! (selection instanceof Selection) ) {
|
||||
if ( ! ( selection instanceof wp.media.model.Selection ) ) {
|
||||
props = selection;
|
||||
|
||||
if ( ! props ) {
|
||||
|
@ -380,9 +378,8 @@ Library = State.extend({
|
|||
_.extend( Library.prototype, selectionSync );
|
||||
|
||||
module.exports = Library;
|
||||
},{"../utils/selection-sync.js":9,"./state.js":6}],4:[function(require,module,exports){
|
||||
/*globals _, Backbone */
|
||||
|
||||
},{"../utils/selection-sync.js":9,"./state.js":6}],4:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.Region
|
||||
*
|
||||
|
@ -560,9 +557,8 @@ _.extend( Region.prototype, {
|
|||
});
|
||||
|
||||
module.exports = Region;
|
||||
},{}],5:[function(require,module,exports){
|
||||
/*globals _, Backbone */
|
||||
|
||||
},{}],5:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.StateMachine
|
||||
*
|
||||
|
@ -685,9 +681,8 @@ _.each([ 'on', 'off', 'trigger' ], function( method ) {
|
|||
});
|
||||
|
||||
module.exports = StateMachine;
|
||||
},{}],6:[function(require,module,exports){
|
||||
/*globals _, Backbone */
|
||||
|
||||
},{}],6:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.State
|
||||
*
|
||||
|
@ -927,9 +922,8 @@ _.each(['toolbar','content'], function( region ) {
|
|||
});
|
||||
|
||||
module.exports = State;
|
||||
|
||||
},{}],7:[function(require,module,exports){
|
||||
/* global wp, _wpMediaViewsL10n, MediaElementPlayer, _wpMediaGridSettings */
|
||||
(function (wp) {
|
||||
var media = wp.media;
|
||||
|
||||
media.controller.EditAttachmentMetadata = require( './controllers/edit-attachment-metadata.js' );
|
||||
|
@ -942,10 +936,7 @@ module.exports = State;
|
|||
media.view.DeleteSelectedButton = require( './views/button/delete-selected.js' );
|
||||
media.view.DeleteSelectedPermanentlyButton = require( './views/button/delete-selected-permanently.js' );
|
||||
|
||||
}(wp));
|
||||
},{"./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){
|
||||
/*globals jQuery, Backbone */
|
||||
|
||||
/**
|
||||
* A router for handling the browser history and application state.
|
||||
*
|
||||
|
@ -990,9 +981,8 @@ var Router = Backbone.Router.extend({
|
|||
});
|
||||
|
||||
module.exports = Router;
|
||||
},{}],9:[function(require,module,exports){
|
||||
/*globals _ */
|
||||
|
||||
},{}],9:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.selectionSync
|
||||
*
|
||||
|
@ -1057,9 +1047,8 @@ var selectionSync = {
|
|||
};
|
||||
|
||||
module.exports = selectionSync;
|
||||
},{}],10:[function(require,module,exports){
|
||||
/*globals _ */
|
||||
|
||||
},{}],10:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.AttachmentCompat
|
||||
*
|
||||
|
@ -1143,9 +1132,8 @@ AttachmentCompat = View.extend({
|
|||
});
|
||||
|
||||
module.exports = AttachmentCompat;
|
||||
},{"./view.js":51}],11:[function(require,module,exports){
|
||||
/*globals _, jQuery */
|
||||
|
||||
},{"./view.js":51}],11:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.AttachmentFilters
|
||||
*
|
||||
|
@ -1222,9 +1210,8 @@ AttachmentFilters = View.extend({
|
|||
});
|
||||
|
||||
module.exports = AttachmentFilters;
|
||||
},{"./view.js":51}],12:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./view.js":51}],12:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.AttachmentFilters.All
|
||||
*
|
||||
|
@ -1314,9 +1301,8 @@ All = AttachmentFilters.extend({
|
|||
});
|
||||
|
||||
module.exports = All;
|
||||
},{"../attachment-filters.js":11}],13:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"../attachment-filters.js":11}],13:[function(require,module,exports){
|
||||
/**
|
||||
* A filter dropdown for month/dates.
|
||||
*
|
||||
|
@ -1357,9 +1343,8 @@ DateFilter = AttachmentFilters.extend({
|
|||
});
|
||||
|
||||
module.exports = DateFilter;
|
||||
},{"../attachment-filters.js":11}],14:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"../attachment-filters.js":11}],14:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.AttachmentFilters.Uploaded
|
||||
*
|
||||
|
@ -1418,9 +1403,8 @@ Uploaded = AttachmentFilters.extend({
|
|||
});
|
||||
|
||||
module.exports = Uploaded;
|
||||
},{"../attachment-filters.js":11}],15:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"../attachment-filters.js":11}],15:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Attachment
|
||||
*
|
||||
|
@ -1973,9 +1957,8 @@ _.each({
|
|||
});
|
||||
|
||||
module.exports = Attachment;
|
||||
},{"./view.js":51}],16:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"./view.js":51}],16:[function(require,module,exports){
|
||||
/**
|
||||
* A similar view to media.view.Attachment.Details
|
||||
* for use in the Edit Attachment modal.
|
||||
|
@ -2010,15 +1993,14 @@ TwoColumn = Details.extend({
|
|||
wp.media.mixin.removeAllPlayers();
|
||||
this.$( 'audio, video' ).each( function (i, elem) {
|
||||
var el = MediaDetails.prepareSrc( elem );
|
||||
new MediaElementPlayer( el, wp.media.mixin.mejsSettings );
|
||||
new window.MediaElementPlayer( el, wp.media.mixin.mejsSettings );
|
||||
} );
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = TwoColumn;
|
||||
},{"../media-details.js":33,"./details.js":17}],17:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"../media-details.js":33,"./details.js":17}],17:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Attachment.Details
|
||||
*
|
||||
|
@ -2078,7 +2060,7 @@ Details = Attachment.extend({
|
|||
deleteAttachment: function( event ) {
|
||||
event.preventDefault();
|
||||
|
||||
if ( confirm( l10n.warnDelete ) ) {
|
||||
if ( window.confirm( l10n.warnDelete ) ) {
|
||||
this.model.destroy();
|
||||
// Keep focus inside media modal
|
||||
// after image is deleted
|
||||
|
@ -2157,6 +2139,7 @@ Details = Attachment.extend({
|
|||
});
|
||||
|
||||
module.exports = Details;
|
||||
|
||||
},{"../attachment.js":15}],18:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Attachment.Library
|
||||
|
@ -2177,9 +2160,8 @@ Library = Attachment.extend({
|
|||
});
|
||||
|
||||
module.exports = Library;
|
||||
},{"../attachment.js":15}],19:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"../attachment.js":15}],19:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Attachments
|
||||
*
|
||||
|
@ -2452,7 +2434,7 @@ Attachments = View.extend({
|
|||
|
||||
// The scroll event occurs on the document, but the element
|
||||
// that should be checked is the document body.
|
||||
if ( el == document ) {
|
||||
if ( el === document ) {
|
||||
el = document.body;
|
||||
scrollTop = $(document).scrollTop();
|
||||
}
|
||||
|
@ -2478,9 +2460,8 @@ Attachments = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Attachments;
|
||||
},{"./attachment.js":15,"./view.js":51}],20:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"./attachment.js":15,"./view.js":51}],20:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.AttachmentsBrowser
|
||||
*
|
||||
|
@ -2671,13 +2652,13 @@ AttachmentsBrowser = View.extend({
|
|||
return;
|
||||
}
|
||||
|
||||
if ( ! mediaTrash && ! confirm( l10n.warnBulkDelete ) ) {
|
||||
if ( ! mediaTrash && ! window.confirm( l10n.warnBulkDelete ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( mediaTrash &&
|
||||
'trash' !== selection.at( 0 ).get( 'status' ) &&
|
||||
! confirm( l10n.warnBulkTrash ) ) {
|
||||
! window.confirm( l10n.warnBulkTrash ) ) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -2725,7 +2706,7 @@ AttachmentsBrowser = View.extend({
|
|||
click: function() {
|
||||
var removed = [], selection = this.controller.state().get( 'selection' );
|
||||
|
||||
if ( ! selection.length || ! confirm( l10n.warnBulkDelete ) ) {
|
||||
if ( ! selection.length || ! window.confirm( l10n.warnBulkDelete ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2938,9 +2919,8 @@ AttachmentsBrowser = View.extend({
|
|||
});
|
||||
|
||||
module.exports = AttachmentsBrowser;
|
||||
},{"../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){
|
||||
/*globals _, Backbone */
|
||||
|
||||
},{"../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){
|
||||
/**
|
||||
* wp.media.view.Button
|
||||
*
|
||||
|
@ -3028,6 +3008,7 @@ Button = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Button;
|
||||
|
||||
},{"./view.js":51}],22:[function(require,module,exports){
|
||||
/**
|
||||
* When MEDIA_TRASH is true, a button that handles bulk Delete Permanently logic
|
||||
|
@ -3072,9 +3053,8 @@ DeleteSelectedPermanently = DeleteSelected.extend({
|
|||
});
|
||||
|
||||
module.exports = DeleteSelectedPermanently;
|
||||
},{"../button.js":21,"./delete-selected.js":23}],23:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"../button.js":21,"./delete-selected.js":23}],23:[function(require,module,exports){
|
||||
/**
|
||||
* A button that handles bulk Delete/Trash logic
|
||||
*
|
||||
|
@ -3124,9 +3104,8 @@ DeleteSelected = Button.extend({
|
|||
});
|
||||
|
||||
module.exports = DeleteSelected;
|
||||
},{"../button.js":21}],24:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"../button.js":21}],24:[function(require,module,exports){
|
||||
var Button = require( '../button.js' ),
|
||||
l10n = wp.media.view.l10n,
|
||||
SelectModeToggle;
|
||||
|
@ -3180,6 +3159,7 @@ SelectModeToggle = Button.extend({
|
|||
});
|
||||
|
||||
module.exports = SelectModeToggle;
|
||||
|
||||
},{"../button.js":21}],25:[function(require,module,exports){
|
||||
var View = require( './view.js' ),
|
||||
EditImage = require( './edit-image.js' ),
|
||||
|
@ -3205,9 +3185,8 @@ Details = EditImage.extend({
|
|||
});
|
||||
|
||||
module.exports = Details;
|
||||
},{"./edit-image.js":26,"./view.js":51}],26:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./edit-image.js":26,"./view.js":51}],26:[function(require,module,exports){
|
||||
var View = require( './view.js' ),
|
||||
EditImage;
|
||||
|
||||
|
@ -3259,6 +3238,7 @@ EditImage = View.extend({
|
|||
});
|
||||
|
||||
module.exports = EditImage;
|
||||
|
||||
},{"./view.js":51}],27:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.FocusManager
|
||||
|
@ -3307,9 +3287,8 @@ FocusManager = View.extend({
|
|||
});
|
||||
|
||||
module.exports = FocusManager;
|
||||
},{"./view.js":51}],28:[function(require,module,exports){
|
||||
/*globals _, Backbone */
|
||||
|
||||
},{"./view.js":51}],28:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Frame
|
||||
*
|
||||
|
@ -3480,9 +3459,8 @@ Frame = View.extend({
|
|||
_.extend( Frame.prototype, StateMachine.prototype );
|
||||
|
||||
module.exports = Frame;
|
||||
},{"../controllers/region.js":4,"../controllers/state-machine.js":5,"../controllers/state.js":6,"./view.js":51}],29:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"../controllers/region.js":4,"../controllers/state-machine.js":5,"../controllers/state.js":6,"./view.js":51}],29:[function(require,module,exports){
|
||||
/**
|
||||
* A frame for editing the details of a specific media item.
|
||||
*
|
||||
|
@ -3727,9 +3705,8 @@ EditAttachments = MediaFrame.extend({
|
|||
});
|
||||
|
||||
module.exports = EditAttachments;
|
||||
},{"../../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){
|
||||
/*globals _, Backbone, wp, jQuery */
|
||||
|
||||
},{"../../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){
|
||||
/**
|
||||
* wp.media.view.MediaFrame.Manage
|
||||
*
|
||||
|
@ -3967,7 +3944,7 @@ Manage = MediaFrame.extend({
|
|||
// Verify pushState support and activate
|
||||
if ( window.history && window.history.pushState ) {
|
||||
Backbone.history.start( {
|
||||
root: _wpMediaGridSettings.adminUrl,
|
||||
root: window._wpMediaGridSettings.adminUrl,
|
||||
pushState: true
|
||||
} );
|
||||
}
|
||||
|
@ -3975,6 +3952,7 @@ Manage = MediaFrame.extend({
|
|||
});
|
||||
|
||||
module.exports = Manage;
|
||||
|
||||
},{"../../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){
|
||||
/**
|
||||
* wp.media.view.Iframe
|
||||
|
@ -4001,6 +3979,7 @@ Iframe = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Iframe;
|
||||
|
||||
},{"./view.js":51}],32:[function(require,module,exports){
|
||||
/**
|
||||
* @class
|
||||
|
@ -4027,9 +4006,8 @@ Label = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Label;
|
||||
},{"./view.js":51}],33:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"./view.js":51}],33:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.MediaDetails
|
||||
*
|
||||
|
@ -4113,7 +4091,7 @@ MediaDetails = AttachmentDisplay.extend({
|
|||
*/
|
||||
setPlayer : function() {
|
||||
if ( ! this.players.length && this.media ) {
|
||||
this.players.push( new MediaElementPlayer( this.media, this.settings ) );
|
||||
this.players.push( new window.MediaElementPlayer( this.media, this.settings ) );
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -4180,9 +4158,8 @@ MediaDetails = AttachmentDisplay.extend({
|
|||
});
|
||||
|
||||
module.exports = MediaDetails;
|
||||
},{"./settings/attachment-display.js":43}],34:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"./settings/attachment-display.js":43}],34:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.MediaFrame
|
||||
*
|
||||
|
@ -4435,9 +4412,8 @@ _.each(['open','close','attach','detach','escape'], function( method ) {
|
|||
});
|
||||
|
||||
module.exports = MediaFrame;
|
||||
},{"./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){
|
||||
/*globals wp, jQuery */
|
||||
|
||||
},{"./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){
|
||||
/**
|
||||
* wp.media.view.MenuItem
|
||||
*
|
||||
|
@ -4509,6 +4485,7 @@ MenuItem = View.extend({
|
|||
});
|
||||
|
||||
module.exports = MenuItem;
|
||||
|
||||
},{"./view.js":51}],36:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Menu
|
||||
|
@ -4625,9 +4602,8 @@ Menu = PriorityList.extend({
|
|||
});
|
||||
|
||||
module.exports = Menu;
|
||||
},{"./menu-item.js":35,"./priority-list.js":38}],37:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"./menu-item.js":35,"./priority-list.js":38}],37:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Modal
|
||||
*
|
||||
|
@ -4841,9 +4817,8 @@ Modal = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Modal;
|
||||
},{"./focus-manager.js":27,"./view.js":51}],38:[function(require,module,exports){
|
||||
/*globals _, Backbone */
|
||||
|
||||
},{"./focus-manager.js":27,"./view.js":51}],38:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.PriorityList
|
||||
*
|
||||
|
@ -4942,6 +4917,7 @@ PriorityList = View.extend({
|
|||
});
|
||||
|
||||
module.exports = PriorityList;
|
||||
|
||||
},{"./view.js":51}],39:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.RouterItem
|
||||
|
@ -4968,6 +4944,7 @@ RouterItem = MenuItem.extend({
|
|||
});
|
||||
|
||||
module.exports = RouterItem;
|
||||
|
||||
},{"./menu-item.js":35}],40:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Router
|
||||
|
@ -5005,9 +4982,8 @@ Router = Menu.extend({
|
|||
});
|
||||
|
||||
module.exports = Router;
|
||||
},{"./menu.js":36,"./router-item.js":39}],41:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"./menu.js":36,"./router-item.js":39}],41:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Search
|
||||
*
|
||||
|
@ -5055,9 +5031,8 @@ Search = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Search;
|
||||
},{"./view.js":51}],42:[function(require,module,exports){
|
||||
/*globals _, Backbone, jQuery */
|
||||
|
||||
},{"./view.js":51}],42:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Settings
|
||||
*
|
||||
|
@ -5165,7 +5140,7 @@ Settings = View.extend({
|
|||
// If the setting has a corresponding user setting,
|
||||
// update that as well.
|
||||
if ( userSetting = $setting.data('userSetting') ) {
|
||||
setUserSetting( userSetting, value );
|
||||
window.setUserSetting( userSetting, value );
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -5177,9 +5152,8 @@ Settings = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Settings;
|
||||
},{"./view.js":51}],43:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./view.js":51}],43:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Settings.AttachmentDisplay
|
||||
*
|
||||
|
@ -5272,6 +5246,7 @@ AttachmentDisplay = Settings.extend({
|
|||
});
|
||||
|
||||
module.exports = AttachmentDisplay;
|
||||
|
||||
},{"../settings.js":42}],44:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Sidebar
|
||||
|
@ -5290,9 +5265,8 @@ Sidebar = PriorityList.extend({
|
|||
});
|
||||
|
||||
module.exports = Sidebar;
|
||||
},{"./priority-list.js":38}],45:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./priority-list.js":38}],45:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Spinner
|
||||
*
|
||||
|
@ -5329,9 +5303,8 @@ Spinner = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Spinner;
|
||||
},{"./view.js":51}],46:[function(require,module,exports){
|
||||
/*globals Backbone, _ */
|
||||
|
||||
},{"./view.js":51}],46:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Toolbar
|
||||
*
|
||||
|
@ -5492,9 +5465,8 @@ Toolbar = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Toolbar;
|
||||
},{"./button.js":21,"./priority-list.js":38,"./view.js":51}],47:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./button.js":21,"./priority-list.js":38,"./view.js":51}],47:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.UploaderInline
|
||||
*
|
||||
|
@ -5625,9 +5597,8 @@ UploaderInline = View.extend({
|
|||
});
|
||||
|
||||
module.exports = UploaderInline;
|
||||
},{"../view.js":51,"./status.js":49}],48:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"../view.js":51,"./status.js":49}],48:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.UploaderStatusError
|
||||
*
|
||||
|
@ -5645,9 +5616,8 @@ UploaderStatusError = View.extend({
|
|||
});
|
||||
|
||||
module.exports = UploaderStatusError;
|
||||
},{"../view.js":51}],49:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"../view.js":51}],49:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.UploaderStatus
|
||||
*
|
||||
|
@ -5785,9 +5755,8 @@ UploaderStatus = View.extend({
|
|||
});
|
||||
|
||||
module.exports = UploaderStatus;
|
||||
},{"../view.js":51,"./status-error.js":48}],50:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"../view.js":51,"./status-error.js":48}],50:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.UploaderWindow
|
||||
*
|
||||
|
@ -5898,9 +5867,8 @@ UploaderWindow = View.extend({
|
|||
});
|
||||
|
||||
module.exports = UploaderWindow;
|
||||
},{"../view.js":51}],51:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"../view.js":51}],51:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.View
|
||||
*
|
||||
|
@ -5965,4 +5933,5 @@ var View = wp.Backbone.View.extend({
|
|||
});
|
||||
|
||||
module.exports = View;
|
||||
|
||||
},{}]},{},[7]);
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/* global wp, _wpMediaViewsL10n, MediaElementPlayer, _wpMediaGridSettings */
|
||||
(function (wp) {
|
||||
var media = wp.media;
|
||||
|
||||
media.controller.EditAttachmentMetadata = require( './controllers/edit-attachment-metadata.js' );
|
||||
|
@ -11,5 +9,3 @@
|
|||
media.view.SelectModeToggleButton = require( './views/button/select-mode-toggle.js' );
|
||||
media.view.DeleteSelectedButton = require( './views/button/delete-selected.js' );
|
||||
media.view.DeleteSelectedPermanentlyButton = require( './views/button/delete-selected-permanently.js' );
|
||||
|
||||
}(wp));
|
4
wp-includes/js/media/grid.min.js
vendored
4
wp-includes/js/media/grid.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,9 +1,8 @@
|
|||
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||
/* global _wpMediaModelsL10n:false */
|
||||
window.wp = window.wp || {};
|
||||
var $ = jQuery,
|
||||
Attachment, Attachments, l10n, media;
|
||||
|
||||
(function($){
|
||||
var Attachment, Attachments, l10n, media;
|
||||
window.wp = window.wp || {};
|
||||
|
||||
/**
|
||||
* Create and return a media frame.
|
||||
|
@ -51,7 +50,7 @@ window.wp = window.wp || {};
|
|||
_.extend( media, { model: {}, view: {}, controller: {}, frames: {} });
|
||||
|
||||
// Link any localized strings.
|
||||
l10n = media.model.l10n = typeof _wpMediaModelsL10n === 'undefined' ? {} : _wpMediaModelsL10n;
|
||||
l10n = media.model.l10n = window._wpMediaModelsL10n || {};
|
||||
|
||||
// Link any settings.
|
||||
media.model.settings = l10n.settings || {};
|
||||
|
@ -230,10 +229,7 @@ window.wp = window.wp || {};
|
|||
window.wp = null;
|
||||
});
|
||||
|
||||
}(jQuery));
|
||||
},{"./models/attachment.js":2,"./models/attachments.js":3,"./models/post-image.js":4,"./models/query.js":5,"./models/selection.js":6}],2:[function(require,module,exports){
|
||||
/*globals jQuery, Backbone, _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.model.Attachment
|
||||
*
|
||||
|
@ -362,7 +358,7 @@ Attachment = Backbone.Model.extend({
|
|||
return $.Deferred().rejectWith( this ).promise();
|
||||
}
|
||||
|
||||
return media.post( 'save-attachment-compat', _.defaults({
|
||||
return wp.media.post( 'save-attachment-compat', _.defaults({
|
||||
id: this.id,
|
||||
nonce: this.get('nonces').update,
|
||||
post_id: wp.media.model.settings.post.id
|
||||
|
@ -400,9 +396,8 @@ Attachment = Backbone.Model.extend({
|
|||
});
|
||||
|
||||
module.exports = Attachment;
|
||||
},{"./attachments.js":3}],3:[function(require,module,exports){
|
||||
/*globals jQuery, Backbone, _, wp */
|
||||
|
||||
},{"./attachments.js":3}],3:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.model.Attachments
|
||||
*
|
||||
|
@ -726,8 +721,9 @@ Attachments = Backbone.Collection.extend({
|
|||
// checking if we're still mirroring that collection when
|
||||
// the request resolves.
|
||||
mirroring.more( options ).done( function() {
|
||||
if ( this === attachments.mirroring )
|
||||
if ( this === attachments.mirroring ) {
|
||||
deferred.resolveWith( this );
|
||||
}
|
||||
});
|
||||
|
||||
return deferred.promise();
|
||||
|
@ -936,9 +932,8 @@ Attachments = Backbone.Collection.extend({
|
|||
});
|
||||
|
||||
module.exports = Attachments;
|
||||
},{"./attachment.js":2,"./query.js":5}],4:[function(require,module,exports){
|
||||
/*globals jQuery, Backbone */
|
||||
|
||||
},{"./attachment.js":2,"./query.js":5}],4:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.model.PostImage
|
||||
*
|
||||
|
@ -1093,9 +1088,8 @@ PostImage = Backbone.Model.extend({
|
|||
});
|
||||
|
||||
module.exports = PostImage;
|
||||
},{"./attachment":2}],5:[function(require,module,exports){
|
||||
/*globals jQuery, _, wp */
|
||||
|
||||
},{"./attachment":2}],5:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.model.Query
|
||||
*
|
||||
|
@ -1402,9 +1396,8 @@ Query = Attachments.extend({
|
|||
});
|
||||
|
||||
module.exports = Query;
|
||||
},{"./attachments.js":3}],6:[function(require,module,exports){
|
||||
/*globals _ */
|
||||
|
||||
},{"./attachments.js":3}],6:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.model.Selection
|
||||
*
|
||||
|
@ -1500,4 +1493,5 @@ Selection = Attachments.extend({
|
|||
});
|
||||
|
||||
module.exports = Selection;
|
||||
|
||||
},{"./attachments.js":3}]},{},[1]);
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
/* global _wpMediaModelsL10n:false */
|
||||
window.wp = window.wp || {};
|
||||
var $ = jQuery,
|
||||
Attachment, Attachments, l10n, media;
|
||||
|
||||
(function($){
|
||||
var Attachment, Attachments, l10n, media;
|
||||
window.wp = window.wp || {};
|
||||
|
||||
/**
|
||||
* Create and return a media frame.
|
||||
|
@ -50,7 +49,7 @@ window.wp = window.wp || {};
|
|||
_.extend( media, { model: {}, view: {}, controller: {}, frames: {} });
|
||||
|
||||
// Link any localized strings.
|
||||
l10n = media.model.l10n = typeof _wpMediaModelsL10n === 'undefined' ? {} : _wpMediaModelsL10n;
|
||||
l10n = media.model.l10n = window._wpMediaModelsL10n || {};
|
||||
|
||||
// Link any settings.
|
||||
media.model.settings = l10n.settings || {};
|
||||
|
@ -228,5 +227,3 @@ window.wp = window.wp || {};
|
|||
$(window).on('unload', function(){
|
||||
window.wp = null;
|
||||
});
|
||||
|
||||
}(jQuery));
|
2
wp-includes/js/media/models.min.js
vendored
2
wp-includes/js/media/models.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,3 @@
|
|||
/*globals jQuery, Backbone, _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.model.Attachment
|
||||
*
|
||||
|
@ -128,7 +126,7 @@ Attachment = Backbone.Model.extend({
|
|||
return $.Deferred().rejectWith( this ).promise();
|
||||
}
|
||||
|
||||
return media.post( 'save-attachment-compat', _.defaults({
|
||||
return wp.media.post( 'save-attachment-compat', _.defaults({
|
||||
id: this.id,
|
||||
nonce: this.get('nonces').update,
|
||||
post_id: wp.media.model.settings.post.id
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals jQuery, Backbone, _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.model.Attachments
|
||||
*
|
||||
|
@ -323,8 +321,9 @@ Attachments = Backbone.Collection.extend({
|
|||
// checking if we're still mirroring that collection when
|
||||
// the request resolves.
|
||||
mirroring.more( options ).done( function() {
|
||||
if ( this === attachments.mirroring )
|
||||
if ( this === attachments.mirroring ) {
|
||||
deferred.resolveWith( this );
|
||||
}
|
||||
});
|
||||
|
||||
return deferred.promise();
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals jQuery, Backbone */
|
||||
|
||||
/**
|
||||
* wp.media.model.PostImage
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals Backbone, _, wp */
|
||||
|
||||
/**
|
||||
* Shared model class for audio and video. Updates the model after
|
||||
* "Add Audio|Video Source" and "Replace Audio|Video" states return
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals jQuery, _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.model.Query
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _ */
|
||||
|
||||
/**
|
||||
* wp.media.model.Selection
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals jQuery, Backbone */
|
||||
|
||||
/**
|
||||
* A router for handling the browser history and application state.
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _ */
|
||||
|
||||
/**
|
||||
* wp.media.selectionSync
|
||||
*
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.controller.CollectionAdd
|
||||
*
|
||||
|
@ -100,9 +98,8 @@ CollectionAdd = Library.extend({
|
|||
});
|
||||
|
||||
module.exports = CollectionAdd;
|
||||
},{"./library.js":10}],2:[function(require,module,exports){
|
||||
/*globals wp, jQuery, Backbone */
|
||||
|
||||
},{"./library.js":10}],2:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.CollectionEdit
|
||||
*
|
||||
|
@ -263,9 +260,8 @@ CollectionEdit = Library.extend({
|
|||
});
|
||||
|
||||
module.exports = CollectionEdit;
|
||||
},{"../views/attachment/edit-library.js":25,"../views/view.js":71,"./library.js":10}],3:[function(require,module,exports){
|
||||
/*globals _, wp, Backbone */
|
||||
|
||||
},{"../views/attachment/edit-library.js":25,"../views/view.js":71,"./library.js":10}],3:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.Cropper
|
||||
*
|
||||
|
@ -383,9 +379,8 @@ Cropper = State.extend({
|
|||
});
|
||||
|
||||
module.exports = Cropper;
|
||||
},{"../views/cropper.js":34,"../views/toolbar.js":63,"./state.js":15}],4:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"../views/cropper.js":34,"../views/toolbar.js":63,"./state.js":15}],4:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.EditImage
|
||||
*
|
||||
|
@ -462,9 +457,8 @@ EditImage = State.extend({
|
|||
});
|
||||
|
||||
module.exports = EditImage;
|
||||
},{"../views/toolbar.js":63,"./state.js":15}],5:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery, Backbone */
|
||||
|
||||
},{"../views/toolbar.js":63,"./state.js":15}],5:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.Embed
|
||||
*
|
||||
|
@ -600,9 +594,8 @@ Embed = State.extend({
|
|||
});
|
||||
|
||||
module.exports = Embed;
|
||||
},{"./state.js":15}],6:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./state.js":15}],6:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.FeaturedImage
|
||||
*
|
||||
|
@ -723,9 +716,8 @@ FeaturedImage = Library.extend({
|
|||
});
|
||||
|
||||
module.exports = FeaturedImage;
|
||||
},{"./library.js":10}],7:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./library.js":10}],7:[function(require,module,exports){
|
||||
/**
|
||||
* A state for selecting more images to add to a gallery.
|
||||
*
|
||||
|
@ -777,8 +769,9 @@ GalleryAdd = Library.extend({
|
|||
*/
|
||||
initialize: function() {
|
||||
// If a library wasn't supplied, create a library of images.
|
||||
if ( ! this.get('library') )
|
||||
if ( ! this.get('library') ) {
|
||||
this.set( 'library', wp.media.query({ type: 'image' }) );
|
||||
}
|
||||
|
||||
Library.prototype.initialize.apply( this, arguments );
|
||||
},
|
||||
|
@ -790,8 +783,9 @@ GalleryAdd = Library.extend({
|
|||
var library = this.get('library'),
|
||||
edit = this.frame.state('gallery-edit').get('library');
|
||||
|
||||
if ( this.editLibrary && this.editLibrary !== edit )
|
||||
if ( this.editLibrary && this.editLibrary !== edit ) {
|
||||
library.unobserve( this.editLibrary );
|
||||
}
|
||||
|
||||
// Accepts attachments that exist in the original library and
|
||||
// that do not exist in gallery's library.
|
||||
|
@ -811,9 +805,8 @@ GalleryAdd = Library.extend({
|
|||
});
|
||||
|
||||
module.exports = GalleryAdd;
|
||||
},{"./library.js":10}],8:[function(require,module,exports){
|
||||
/*globals wp, Backbone */
|
||||
|
||||
},{"./library.js":10}],8:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.GalleryEdit
|
||||
*
|
||||
|
@ -875,12 +868,15 @@ GalleryEdit = Library.extend({
|
|||
*/
|
||||
initialize: function() {
|
||||
// If we haven't been provided a `library`, create a `Selection`.
|
||||
if ( ! this.get('library') )
|
||||
if ( ! this.get('library') ) {
|
||||
this.set( 'library', new wp.media.model.Selection() );
|
||||
}
|
||||
|
||||
// The single `Attachment` view to be used in the `Attachments` view.
|
||||
if ( ! this.get('AttachmentView') )
|
||||
if ( ! this.get('AttachmentView') ) {
|
||||
this.set( 'AttachmentView', EditLibraryView );
|
||||
}
|
||||
|
||||
Library.prototype.initialize.apply( this, arguments );
|
||||
},
|
||||
|
||||
|
@ -951,9 +947,8 @@ GalleryEdit = Library.extend({
|
|||
});
|
||||
|
||||
module.exports = GalleryEdit;
|
||||
},{"../views/attachment/edit-library.js":25,"../views/settings/gallery.js":59,"./library.js":10}],9:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"../views/attachment/edit-library.js":25,"../views/settings/gallery.js":59,"./library.js":10}],9:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.ImageDetails
|
||||
*
|
||||
|
@ -1014,9 +1009,8 @@ ImageDetails = State.extend({
|
|||
});
|
||||
|
||||
module.exports = ImageDetails;
|
||||
},{"./library.js":10,"./state.js":15}],10:[function(require,module,exports){
|
||||
/*globals _, wp, Backbone, getUserSetting, setUserSetting */
|
||||
|
||||
},{"./library.js":10,"./state.js":15}],10:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.Library
|
||||
*
|
||||
|
@ -1054,6 +1048,8 @@ module.exports = ImageDetails;
|
|||
var selectionSync = require( '../utils/selection-sync.js' ),
|
||||
State = require( './state.js' ),
|
||||
l10n = wp.media.view.l10n,
|
||||
getUserSetting = window.getUserSetting,
|
||||
setUserSetting = window.setUserSetting,
|
||||
Library;
|
||||
|
||||
Library = State.extend({
|
||||
|
@ -1088,7 +1084,7 @@ Library = State.extend({
|
|||
this.set( 'library', wp.media.query() );
|
||||
}
|
||||
|
||||
if ( ! (selection instanceof Selection) ) {
|
||||
if ( ! ( selection instanceof wp.media.model.Selection ) ) {
|
||||
props = selection;
|
||||
|
||||
if ( ! props ) {
|
||||
|
@ -1287,9 +1283,8 @@ Library = State.extend({
|
|||
_.extend( Library.prototype, selectionSync );
|
||||
|
||||
module.exports = Library;
|
||||
},{"../utils/selection-sync.js":16,"./state.js":15}],11:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"../utils/selection-sync.js":16,"./state.js":15}],11:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.MediaLibrary
|
||||
*
|
||||
|
@ -1338,9 +1333,8 @@ MediaLibrary = Library.extend({
|
|||
});
|
||||
|
||||
module.exports = MediaLibrary;
|
||||
},{"./library.js":10}],12:[function(require,module,exports){
|
||||
/*globals _, Backbone */
|
||||
|
||||
},{"./library.js":10}],12:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.Region
|
||||
*
|
||||
|
@ -1518,9 +1512,8 @@ _.extend( Region.prototype, {
|
|||
});
|
||||
|
||||
module.exports = Region;
|
||||
},{}],13:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{}],13:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.ReplaceImage
|
||||
*
|
||||
|
@ -1627,9 +1620,8 @@ ReplaceImage = Library.extend({
|
|||
});
|
||||
|
||||
module.exports = ReplaceImage;
|
||||
},{"./library.js":10}],14:[function(require,module,exports){
|
||||
/*globals _, Backbone */
|
||||
|
||||
},{"./library.js":10}],14:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.StateMachine
|
||||
*
|
||||
|
@ -1752,9 +1744,8 @@ _.each([ 'on', 'off', 'trigger' ], function( method ) {
|
|||
});
|
||||
|
||||
module.exports = StateMachine;
|
||||
},{}],15:[function(require,module,exports){
|
||||
/*globals _, Backbone */
|
||||
|
||||
},{}],15:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.controller.State
|
||||
*
|
||||
|
@ -1994,9 +1985,8 @@ _.each(['toolbar','content'], function( region ) {
|
|||
});
|
||||
|
||||
module.exports = State;
|
||||
},{}],16:[function(require,module,exports){
|
||||
/*globals _ */
|
||||
|
||||
},{}],16:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.selectionSync
|
||||
*
|
||||
|
@ -2061,16 +2051,16 @@ var selectionSync = {
|
|||
};
|
||||
|
||||
module.exports = selectionSync;
|
||||
|
||||
},{}],17:[function(require,module,exports){
|
||||
/* global _wpMediaViewsL10n, confirm, getUserSetting, setUserSetting */
|
||||
( function( $, _ ) {
|
||||
var l10n,
|
||||
media = wp.media;
|
||||
var media = wp.media,
|
||||
$ = jQuery,
|
||||
l10n;
|
||||
|
||||
media.isTouchDevice = ( 'ontouchend' in document );
|
||||
|
||||
// Link any localized strings.
|
||||
l10n = media.view.l10n = typeof _wpMediaViewsL10n === 'undefined' ? {} : _wpMediaViewsL10n;
|
||||
l10n = media.view.l10n = window._wpMediaViewsL10n || {};
|
||||
|
||||
// Link any settings.
|
||||
media.view.settings = l10n.settings || {};
|
||||
|
@ -2209,10 +2199,7 @@ module.exports = selectionSync;
|
|||
media.view.EditImage = require( './views/edit-image.js' );
|
||||
media.view.Spinner = require( './views/spinner.js' );
|
||||
|
||||
}(jQuery, _));
|
||||
},{"./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){
|
||||
/*globals _ */
|
||||
|
||||
/**
|
||||
* wp.media.view.AttachmentCompat
|
||||
*
|
||||
|
@ -2296,9 +2283,8 @@ AttachmentCompat = View.extend({
|
|||
});
|
||||
|
||||
module.exports = AttachmentCompat;
|
||||
},{"./view.js":71}],19:[function(require,module,exports){
|
||||
/*globals _, jQuery */
|
||||
|
||||
},{"./view.js":71}],19:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.AttachmentFilters
|
||||
*
|
||||
|
@ -2375,9 +2361,8 @@ AttachmentFilters = View.extend({
|
|||
});
|
||||
|
||||
module.exports = AttachmentFilters;
|
||||
},{"./view.js":71}],20:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./view.js":71}],20:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.AttachmentFilters.All
|
||||
*
|
||||
|
@ -2467,9 +2452,8 @@ All = AttachmentFilters.extend({
|
|||
});
|
||||
|
||||
module.exports = All;
|
||||
},{"../attachment-filters.js":19}],21:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"../attachment-filters.js":19}],21:[function(require,module,exports){
|
||||
/**
|
||||
* A filter dropdown for month/dates.
|
||||
*
|
||||
|
@ -2510,9 +2494,8 @@ DateFilter = AttachmentFilters.extend({
|
|||
});
|
||||
|
||||
module.exports = DateFilter;
|
||||
},{"../attachment-filters.js":19}],22:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"../attachment-filters.js":19}],22:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.AttachmentFilters.Uploaded
|
||||
*
|
||||
|
@ -2571,9 +2554,8 @@ Uploaded = AttachmentFilters.extend({
|
|||
});
|
||||
|
||||
module.exports = Uploaded;
|
||||
},{"../attachment-filters.js":19}],23:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"../attachment-filters.js":19}],23:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Attachment
|
||||
*
|
||||
|
@ -3126,9 +3108,8 @@ _.each({
|
|||
});
|
||||
|
||||
module.exports = Attachment;
|
||||
},{"./view.js":71}],24:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./view.js":71}],24:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Attachment.Details
|
||||
*
|
||||
|
@ -3188,7 +3169,7 @@ Details = Attachment.extend({
|
|||
deleteAttachment: function( event ) {
|
||||
event.preventDefault();
|
||||
|
||||
if ( confirm( l10n.warnDelete ) ) {
|
||||
if ( window.confirm( l10n.warnDelete ) ) {
|
||||
this.model.destroy();
|
||||
// Keep focus inside media modal
|
||||
// after image is deleted
|
||||
|
@ -3267,6 +3248,7 @@ Details = Attachment.extend({
|
|||
});
|
||||
|
||||
module.exports = Details;
|
||||
|
||||
},{"../attachment.js":23}],25:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Attachment.EditLibrary
|
||||
|
@ -3287,6 +3269,7 @@ EditLibrary = Attachment.extend({
|
|||
});
|
||||
|
||||
module.exports = EditLibrary;
|
||||
|
||||
},{"../attachment.js":23}],26:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Attachments.EditSelection
|
||||
|
@ -3308,6 +3291,7 @@ EditSelection = Selection.extend({
|
|||
});
|
||||
|
||||
module.exports = EditSelection;
|
||||
|
||||
},{"./selection.js":28}],27:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Attachment.Library
|
||||
|
@ -3328,6 +3312,7 @@ Library = Attachment.extend({
|
|||
});
|
||||
|
||||
module.exports = Library;
|
||||
|
||||
},{"../attachment.js":23}],28:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Attachment.Selection
|
||||
|
@ -3352,9 +3337,8 @@ Selection = Attachment.extend({
|
|||
});
|
||||
|
||||
module.exports = Selection;
|
||||
},{"../attachment.js":23}],29:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"../attachment.js":23}],29:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Attachments
|
||||
*
|
||||
|
@ -3627,7 +3611,7 @@ Attachments = View.extend({
|
|||
|
||||
// The scroll event occurs on the document, but the element
|
||||
// that should be checked is the document body.
|
||||
if ( el == document ) {
|
||||
if ( el === document ) {
|
||||
el = document.body;
|
||||
scrollTop = $(document).scrollTop();
|
||||
}
|
||||
|
@ -3653,9 +3637,8 @@ Attachments = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Attachments;
|
||||
},{"./attachment.js":23,"./view.js":71}],30:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"./attachment.js":23,"./view.js":71}],30:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.AttachmentsBrowser
|
||||
*
|
||||
|
@ -3846,13 +3829,13 @@ AttachmentsBrowser = View.extend({
|
|||
return;
|
||||
}
|
||||
|
||||
if ( ! mediaTrash && ! confirm( l10n.warnBulkDelete ) ) {
|
||||
if ( ! mediaTrash && ! window.confirm( l10n.warnBulkDelete ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( mediaTrash &&
|
||||
'trash' !== selection.at( 0 ).get( 'status' ) &&
|
||||
! confirm( l10n.warnBulkTrash ) ) {
|
||||
! window.confirm( l10n.warnBulkTrash ) ) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -3900,7 +3883,7 @@ AttachmentsBrowser = View.extend({
|
|||
click: function() {
|
||||
var removed = [], selection = this.controller.state().get( 'selection' );
|
||||
|
||||
if ( ! selection.length || ! confirm( l10n.warnBulkDelete ) ) {
|
||||
if ( ! selection.length || ! window.confirm( l10n.warnBulkDelete ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4113,9 +4096,8 @@ AttachmentsBrowser = View.extend({
|
|||
});
|
||||
|
||||
module.exports = AttachmentsBrowser;
|
||||
},{"../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){
|
||||
/*globals _ */
|
||||
|
||||
},{"../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){
|
||||
/**
|
||||
* wp.media.view.Attachments.Selection
|
||||
*
|
||||
|
@ -4145,9 +4127,8 @@ Selection = Attachments.extend({
|
|||
});
|
||||
|
||||
module.exports = Selection;
|
||||
},{"../attachment/selection.js":28,"../attachments.js":29}],32:[function(require,module,exports){
|
||||
/*globals _, Backbone, jQuery */
|
||||
|
||||
},{"../attachment/selection.js":28,"../attachments.js":29}],32:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.ButtonGroup
|
||||
*
|
||||
|
@ -4194,9 +4175,8 @@ ButtonGroup = View.extend({
|
|||
});
|
||||
|
||||
module.exports = ButtonGroup;
|
||||
},{"./button.js":33,"./view.js":71}],33:[function(require,module,exports){
|
||||
/*globals _, Backbone */
|
||||
|
||||
},{"./button.js":33,"./view.js":71}],33:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Button
|
||||
*
|
||||
|
@ -4284,9 +4264,8 @@ Button = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Button;
|
||||
},{"./view.js":71}],34:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"./view.js":71}],34:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Cropper
|
||||
*
|
||||
|
@ -4347,15 +4326,14 @@ Cropper = View.extend({
|
|||
|
||||
this.views.add( '.upload-errors', new UploaderStatusError({
|
||||
filename: UploaderStatus.prototype.filename(filename),
|
||||
message: _wpMediaViewsL10n.cropError
|
||||
message: window._wpMediaViewsL10n.cropError
|
||||
}), { at: 0 });
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = Cropper;
|
||||
},{"./uploader/status-error.js":68,"./uploader/status.js":69,"./view.js":71}],35:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./uploader/status-error.js":68,"./uploader/status.js":69,"./view.js":71}],35:[function(require,module,exports){
|
||||
var View = require( './view.js' ),
|
||||
EditImage;
|
||||
|
||||
|
@ -4407,6 +4385,7 @@ EditImage = View.extend({
|
|||
});
|
||||
|
||||
module.exports = EditImage;
|
||||
|
||||
},{"./view.js":71}],36:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Embed
|
||||
|
@ -4476,9 +4455,8 @@ Embed = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Embed;
|
||||
},{"./embed/image.js":37,"./embed/link.js":38,"./embed/url.js":39,"./view.js":71}],37:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"./embed/image.js":37,"./embed/link.js":38,"./embed/url.js":39,"./view.js":71}],37:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.EmbedImage
|
||||
*
|
||||
|
@ -4510,9 +4488,8 @@ EmbedImage = AttachmentDisplay.extend({
|
|||
});
|
||||
|
||||
module.exports = EmbedImage;
|
||||
},{"../settings/attachment-display.js":58}],38:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"../settings/attachment-display.js":58}],38:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.EmbedLink
|
||||
*
|
||||
|
@ -4578,9 +4555,8 @@ EmbedLink = Settings.extend({
|
|||
});
|
||||
|
||||
module.exports = EmbedLink;
|
||||
},{"../settings.js":57}],39:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"../settings.js":57}],39:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.EmbedUrl
|
||||
*
|
||||
|
@ -4658,6 +4634,7 @@ EmbedUrl = View.extend({
|
|||
});
|
||||
|
||||
module.exports = EmbedUrl;
|
||||
|
||||
},{"../view.js":71}],40:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.FocusManager
|
||||
|
@ -4706,9 +4683,8 @@ FocusManager = View.extend({
|
|||
});
|
||||
|
||||
module.exports = FocusManager;
|
||||
},{"./view.js":71}],41:[function(require,module,exports){
|
||||
/*globals _, Backbone */
|
||||
|
||||
},{"./view.js":71}],41:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Frame
|
||||
*
|
||||
|
@ -4879,9 +4855,8 @@ Frame = View.extend({
|
|||
_.extend( Frame.prototype, StateMachine.prototype );
|
||||
|
||||
module.exports = Frame;
|
||||
},{"../controllers/region.js":12,"../controllers/state-machine.js":14,"../controllers/state.js":15,"./view.js":71}],42:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"../controllers/region.js":12,"../controllers/state-machine.js":14,"../controllers/state.js":15,"./view.js":71}],42:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.MediaFrame.ImageDetails
|
||||
*
|
||||
|
@ -5063,9 +5038,8 @@ ImageDetails = Select.extend({
|
|||
});
|
||||
|
||||
module.exports = ImageDetails;
|
||||
},{"../../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){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"../../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){
|
||||
/**
|
||||
* wp.media.view.MediaFrame.Post
|
||||
*
|
||||
|
@ -5815,9 +5789,8 @@ Post = Select.extend({
|
|||
});
|
||||
|
||||
module.exports = Post;
|
||||
},{"../../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){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"../../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){
|
||||
/**
|
||||
* wp.media.view.MediaFrame.Select
|
||||
*
|
||||
|
@ -5990,6 +5963,7 @@ Select = MediaFrame.extend({
|
|||
});
|
||||
|
||||
module.exports = Select;
|
||||
|
||||
},{"../../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){
|
||||
/**
|
||||
* wp.media.view.Iframe
|
||||
|
@ -6016,9 +5990,8 @@ Iframe = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Iframe;
|
||||
},{"./view.js":71}],46:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"./view.js":71}],46:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.ImageDetails
|
||||
*
|
||||
|
@ -6092,7 +6065,7 @@ ImageDetails = AttachmentDisplay.extend({
|
|||
postRender: function() {
|
||||
setTimeout( _.bind( this.resetFocus, this ), 10 );
|
||||
this.toggleLinkSettings();
|
||||
if ( getUserSetting( 'advImgDetails' ) === 'show' ) {
|
||||
if ( window.getUserSetting( 'advImgDetails' ) === 'show' ) {
|
||||
this.toggleAdvanced( true );
|
||||
}
|
||||
this.trigger( 'post-render' );
|
||||
|
@ -6165,7 +6138,7 @@ ImageDetails = AttachmentDisplay.extend({
|
|||
mode = 'show';
|
||||
}
|
||||
|
||||
setUserSetting( 'advImgDetails', mode );
|
||||
window.setUserSetting( 'advImgDetails', mode );
|
||||
},
|
||||
|
||||
editAttachment: function( event ) {
|
||||
|
@ -6185,6 +6158,7 @@ ImageDetails = AttachmentDisplay.extend({
|
|||
});
|
||||
|
||||
module.exports = AttachmentDisplay;
|
||||
|
||||
},{"./settings/attachment-display.js":58}],47:[function(require,module,exports){
|
||||
/**
|
||||
* @class
|
||||
|
@ -6211,9 +6185,8 @@ Label = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Label;
|
||||
},{"./view.js":71}],48:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"./view.js":71}],48:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.MediaFrame
|
||||
*
|
||||
|
@ -6466,9 +6439,8 @@ _.each(['open','close','attach','detach','escape'], function( method ) {
|
|||
});
|
||||
|
||||
module.exports = MediaFrame;
|
||||
},{"./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){
|
||||
/*globals wp, jQuery */
|
||||
|
||||
},{"./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){
|
||||
/**
|
||||
* wp.media.view.MenuItem
|
||||
*
|
||||
|
@ -6540,6 +6512,7 @@ MenuItem = View.extend({
|
|||
});
|
||||
|
||||
module.exports = MenuItem;
|
||||
|
||||
},{"./view.js":71}],50:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Menu
|
||||
|
@ -6656,9 +6629,8 @@ Menu = PriorityList.extend({
|
|||
});
|
||||
|
||||
module.exports = Menu;
|
||||
},{"./menu-item.js":49,"./priority-list.js":52}],51:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"./menu-item.js":49,"./priority-list.js":52}],51:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Modal
|
||||
*
|
||||
|
@ -6872,9 +6844,8 @@ Modal = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Modal;
|
||||
},{"./focus-manager.js":40,"./view.js":71}],52:[function(require,module,exports){
|
||||
/*globals _, Backbone */
|
||||
|
||||
},{"./focus-manager.js":40,"./view.js":71}],52:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.PriorityList
|
||||
*
|
||||
|
@ -6973,6 +6944,7 @@ PriorityList = View.extend({
|
|||
});
|
||||
|
||||
module.exports = PriorityList;
|
||||
|
||||
},{"./view.js":71}],53:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.RouterItem
|
||||
|
@ -6999,6 +6971,7 @@ RouterItem = MenuItem.extend({
|
|||
});
|
||||
|
||||
module.exports = RouterItem;
|
||||
|
||||
},{"./menu-item.js":49}],54:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Router
|
||||
|
@ -7036,9 +7009,8 @@ Router = Menu.extend({
|
|||
});
|
||||
|
||||
module.exports = Router;
|
||||
},{"./menu.js":50,"./router-item.js":53}],55:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"./menu.js":50,"./router-item.js":53}],55:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Search
|
||||
*
|
||||
|
@ -7086,9 +7058,8 @@ Search = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Search;
|
||||
},{"./view.js":71}],56:[function(require,module,exports){
|
||||
/*globals _, Backbone, wp */
|
||||
|
||||
},{"./view.js":71}],56:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Selection
|
||||
*
|
||||
|
@ -7172,9 +7143,8 @@ Selection = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Selection;
|
||||
},{"./attachments/selection.js":31,"./view.js":71}],57:[function(require,module,exports){
|
||||
/*globals _, Backbone, jQuery */
|
||||
|
||||
},{"./attachments/selection.js":31,"./view.js":71}],57:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Settings
|
||||
*
|
||||
|
@ -7282,7 +7252,7 @@ Settings = View.extend({
|
|||
// If the setting has a corresponding user setting,
|
||||
// update that as well.
|
||||
if ( userSetting = $setting.data('userSetting') ) {
|
||||
setUserSetting( userSetting, value );
|
||||
window.setUserSetting( userSetting, value );
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -7294,9 +7264,8 @@ Settings = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Settings;
|
||||
},{"./view.js":71}],58:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./view.js":71}],58:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Settings.AttachmentDisplay
|
||||
*
|
||||
|
@ -7389,9 +7358,8 @@ AttachmentDisplay = Settings.extend({
|
|||
});
|
||||
|
||||
module.exports = AttachmentDisplay;
|
||||
},{"../settings.js":57}],59:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"../settings.js":57}],59:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Settings.Gallery
|
||||
*
|
||||
|
@ -7410,9 +7378,8 @@ Gallery = Settings.extend({
|
|||
});
|
||||
|
||||
module.exports = Gallery;
|
||||
},{"../settings.js":57}],60:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"../settings.js":57}],60:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Settings.Playlist
|
||||
*
|
||||
|
@ -7431,6 +7398,7 @@ Playlist = Settings.extend({
|
|||
});
|
||||
|
||||
module.exports = Playlist;
|
||||
|
||||
},{"../settings.js":57}],61:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Sidebar
|
||||
|
@ -7449,9 +7417,8 @@ Sidebar = PriorityList.extend({
|
|||
});
|
||||
|
||||
module.exports = Sidebar;
|
||||
},{"./priority-list.js":52}],62:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./priority-list.js":52}],62:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Spinner
|
||||
*
|
||||
|
@ -7488,9 +7455,8 @@ Spinner = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Spinner;
|
||||
},{"./view.js":71}],63:[function(require,module,exports){
|
||||
/*globals Backbone, _ */
|
||||
|
||||
},{"./view.js":71}],63:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Toolbar
|
||||
*
|
||||
|
@ -7651,9 +7617,8 @@ Toolbar = View.extend({
|
|||
});
|
||||
|
||||
module.exports = Toolbar;
|
||||
},{"./button.js":33,"./priority-list.js":52,"./view.js":71}],64:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./button.js":33,"./priority-list.js":52,"./view.js":71}],64:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Toolbar.Embed
|
||||
*
|
||||
|
@ -7689,9 +7654,8 @@ Embed = Select.extend({
|
|||
});
|
||||
|
||||
module.exports = Embed;
|
||||
},{"./select.js":65}],65:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"./select.js":65}],65:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.Toolbar.Select
|
||||
*
|
||||
|
@ -7760,9 +7724,8 @@ Select = Toolbar.extend({
|
|||
});
|
||||
|
||||
module.exports = Select;
|
||||
},{"../toolbar.js":63}],66:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"../toolbar.js":63}],66:[function(require,module,exports){
|
||||
/**
|
||||
* Creates a dropzone on WP editor instances (elements with .wp-editor-wrap
|
||||
* or #wp-fullscreen-body) and relays drag'n'dropped files to a media workflow.
|
||||
|
@ -7980,9 +7943,8 @@ EditorUploader = View.extend({
|
|||
});
|
||||
|
||||
module.exports = EditorUploader;
|
||||
},{"../view.js":71}],67:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"../view.js":71}],67:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.UploaderInline
|
||||
*
|
||||
|
@ -8113,9 +8075,8 @@ UploaderInline = View.extend({
|
|||
});
|
||||
|
||||
module.exports = UploaderInline;
|
||||
},{"../view.js":71,"./status.js":69}],68:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"../view.js":71,"./status.js":69}],68:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.UploaderStatusError
|
||||
*
|
||||
|
@ -8133,9 +8094,8 @@ UploaderStatusError = View.extend({
|
|||
});
|
||||
|
||||
module.exports = UploaderStatusError;
|
||||
},{"../view.js":71}],69:[function(require,module,exports){
|
||||
/*globals _, wp */
|
||||
|
||||
},{"../view.js":71}],69:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.UploaderStatus
|
||||
*
|
||||
|
@ -8273,9 +8233,8 @@ UploaderStatus = View.extend({
|
|||
});
|
||||
|
||||
module.exports = UploaderStatus;
|
||||
},{"../view.js":71,"./status-error.js":68}],70:[function(require,module,exports){
|
||||
/*globals _, wp, jQuery */
|
||||
|
||||
},{"../view.js":71,"./status-error.js":68}],70:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.view.UploaderWindow
|
||||
*
|
||||
|
@ -8386,9 +8345,8 @@ UploaderWindow = View.extend({
|
|||
});
|
||||
|
||||
module.exports = UploaderWindow;
|
||||
},{"../view.js":71}],71:[function(require,module,exports){
|
||||
/*globals wp */
|
||||
|
||||
},{"../view.js":71}],71:[function(require,module,exports){
|
||||
/**
|
||||
* wp.media.View
|
||||
*
|
||||
|
@ -8453,4 +8411,5 @@ var View = wp.Backbone.View.extend({
|
|||
});
|
||||
|
||||
module.exports = View;
|
||||
|
||||
},{}]},{},[17]);
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
/* global _wpMediaViewsL10n, confirm, getUserSetting, setUserSetting */
|
||||
( function( $, _ ) {
|
||||
var l10n,
|
||||
media = wp.media;
|
||||
var media = wp.media,
|
||||
$ = jQuery,
|
||||
l10n;
|
||||
|
||||
media.isTouchDevice = ( 'ontouchend' in document );
|
||||
|
||||
// Link any localized strings.
|
||||
l10n = media.view.l10n = typeof _wpMediaViewsL10n === 'undefined' ? {} : _wpMediaViewsL10n;
|
||||
l10n = media.view.l10n = window._wpMediaViewsL10n || {};
|
||||
|
||||
// Link any settings.
|
||||
media.view.settings = l10n.settings || {};
|
||||
|
@ -144,5 +143,3 @@
|
|||
media.view.Cropper = require( './views/cropper.js' );
|
||||
media.view.EditImage = require( './views/edit-image.js' );
|
||||
media.view.Spinner = require( './views/spinner.js' );
|
||||
|
||||
}(jQuery, _));
|
6
wp-includes/js/media/views.min.js
vendored
6
wp-includes/js/media/views.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,3 @@
|
|||
/*globals _ */
|
||||
|
||||
/**
|
||||
* wp.media.view.AttachmentCompat
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, jQuery */
|
||||
|
||||
/**
|
||||
* wp.media.view.AttachmentFilters
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.AttachmentFilters.All
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* A filter dropdown for month/dates.
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.AttachmentFilters.Uploaded
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp, jQuery */
|
||||
|
||||
/**
|
||||
* wp.media.view.Attachment
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp */
|
||||
|
||||
/**
|
||||
* A similar view to media.view.Attachment.Details
|
||||
* for use in the Edit Attachment modal.
|
||||
|
@ -34,7 +32,7 @@ TwoColumn = Details.extend({
|
|||
wp.media.mixin.removeAllPlayers();
|
||||
this.$( 'audio, video' ).each( function (i, elem) {
|
||||
var el = MediaDetails.prepareSrc( elem );
|
||||
new MediaElementPlayer( el, wp.media.mixin.mejsSettings );
|
||||
new window.MediaElementPlayer( el, wp.media.mixin.mejsSettings );
|
||||
} );
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.Attachment.Details
|
||||
*
|
||||
|
@ -59,7 +57,7 @@ Details = Attachment.extend({
|
|||
deleteAttachment: function( event ) {
|
||||
event.preventDefault();
|
||||
|
||||
if ( confirm( l10n.warnDelete ) ) {
|
||||
if ( window.confirm( l10n.warnDelete ) ) {
|
||||
this.model.destroy();
|
||||
// Keep focus inside media modal
|
||||
// after image is deleted
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp, jQuery */
|
||||
|
||||
/**
|
||||
* wp.media.view.Attachments
|
||||
*
|
||||
|
@ -272,7 +270,7 @@ Attachments = View.extend({
|
|||
|
||||
// The scroll event occurs on the document, but the element
|
||||
// that should be checked is the document body.
|
||||
if ( el == document ) {
|
||||
if ( el === document ) {
|
||||
el = document.body;
|
||||
scrollTop = $(document).scrollTop();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp, jQuery */
|
||||
|
||||
/**
|
||||
* wp.media.view.AttachmentsBrowser
|
||||
*
|
||||
|
@ -190,13 +188,13 @@ AttachmentsBrowser = View.extend({
|
|||
return;
|
||||
}
|
||||
|
||||
if ( ! mediaTrash && ! confirm( l10n.warnBulkDelete ) ) {
|
||||
if ( ! mediaTrash && ! window.confirm( l10n.warnBulkDelete ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( mediaTrash &&
|
||||
'trash' !== selection.at( 0 ).get( 'status' ) &&
|
||||
! confirm( l10n.warnBulkTrash ) ) {
|
||||
! window.confirm( l10n.warnBulkTrash ) ) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -244,7 +242,7 @@ AttachmentsBrowser = View.extend({
|
|||
click: function() {
|
||||
var removed = [], selection = this.controller.state().get( 'selection' );
|
||||
|
||||
if ( ! selection.length || ! confirm( l10n.warnBulkDelete ) ) {
|
||||
if ( ! selection.length || ! window.confirm( l10n.warnBulkDelete ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _ */
|
||||
|
||||
/**
|
||||
* wp.media.view.Attachments.Selection
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.AudioDetails
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, Backbone, jQuery */
|
||||
|
||||
/**
|
||||
* wp.media.view.ButtonGroup
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, Backbone */
|
||||
|
||||
/**
|
||||
* wp.media.view.Button
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp */
|
||||
|
||||
/**
|
||||
* A button that handles bulk Delete/Trash logic
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp */
|
||||
|
||||
var Button = require( '../button.js' ),
|
||||
l10n = wp.media.view.l10n,
|
||||
SelectModeToggle;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp, jQuery */
|
||||
|
||||
/**
|
||||
* wp.media.view.Cropper
|
||||
*
|
||||
|
@ -60,7 +58,7 @@ Cropper = View.extend({
|
|||
|
||||
this.views.add( '.upload-errors', new UploaderStatusError({
|
||||
filename: UploaderStatus.prototype.filename(filename),
|
||||
message: _wpMediaViewsL10n.cropError
|
||||
message: window._wpMediaViewsL10n.cropError
|
||||
}), { at: 0 });
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
var View = require( './view.js' ),
|
||||
EditImage;
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.EmbedImage
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp, jQuery */
|
||||
|
||||
/**
|
||||
* wp.media.view.EmbedLink
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp, jQuery */
|
||||
|
||||
/**
|
||||
* wp.media.view.EmbedUrl
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, Backbone */
|
||||
|
||||
/**
|
||||
* wp.media.view.Frame
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.MediaFrame.AudioDetails
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp, jQuery */
|
||||
|
||||
/**
|
||||
* A frame for editing the details of a specific media item.
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.MediaFrame.ImageDetails
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, Backbone, wp, jQuery */
|
||||
|
||||
/**
|
||||
* wp.media.view.MediaFrame.Manage
|
||||
*
|
||||
|
@ -237,7 +235,7 @@ Manage = MediaFrame.extend({
|
|||
// Verify pushState support and activate
|
||||
if ( window.history && window.history.pushState ) {
|
||||
Backbone.history.start( {
|
||||
root: _wpMediaGridSettings.adminUrl,
|
||||
root: window._wpMediaGridSettings.adminUrl,
|
||||
pushState: true
|
||||
} );
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.MediaFrame.MediaDetails
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.MediaFrame.Post
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.MediaFrame.Select
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.MediaFrame.VideoDetails
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp, jQuery */
|
||||
|
||||
/**
|
||||
* wp.media.view.ImageDetails
|
||||
*
|
||||
|
@ -73,7 +71,7 @@ ImageDetails = AttachmentDisplay.extend({
|
|||
postRender: function() {
|
||||
setTimeout( _.bind( this.resetFocus, this ), 10 );
|
||||
this.toggleLinkSettings();
|
||||
if ( getUserSetting( 'advImgDetails' ) === 'show' ) {
|
||||
if ( window.getUserSetting( 'advImgDetails' ) === 'show' ) {
|
||||
this.toggleAdvanced( true );
|
||||
}
|
||||
this.trigger( 'post-render' );
|
||||
|
@ -146,7 +144,7 @@ ImageDetails = AttachmentDisplay.extend({
|
|||
mode = 'show';
|
||||
}
|
||||
|
||||
setUserSetting( 'advImgDetails', mode );
|
||||
window.setUserSetting( 'advImgDetails', mode );
|
||||
},
|
||||
|
||||
editAttachment: function( event ) {
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp, jQuery */
|
||||
|
||||
/**
|
||||
* wp.media.view.MediaDetails
|
||||
*
|
||||
|
@ -83,7 +81,7 @@ MediaDetails = AttachmentDisplay.extend({
|
|||
*/
|
||||
setPlayer : function() {
|
||||
if ( ! this.players.length && this.media ) {
|
||||
this.players.push( new MediaElementPlayer( this.media, this.settings ) );
|
||||
this.players.push( new window.MediaElementPlayer( this.media, this.settings ) );
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp, jQuery */
|
||||
|
||||
/**
|
||||
* wp.media.view.MediaFrame
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp, jQuery */
|
||||
|
||||
/**
|
||||
* wp.media.view.MenuItem
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp, jQuery */
|
||||
|
||||
/**
|
||||
* wp.media.view.Modal
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, Backbone */
|
||||
|
||||
/**
|
||||
* wp.media.view.PriorityList
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.Search
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, Backbone, wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.Selection
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, Backbone, jQuery */
|
||||
|
||||
/**
|
||||
* wp.media.view.Settings
|
||||
*
|
||||
|
@ -107,7 +105,7 @@ Settings = View.extend({
|
|||
// If the setting has a corresponding user setting,
|
||||
// update that as well.
|
||||
if ( userSetting = $setting.data('userSetting') ) {
|
||||
setUserSetting( userSetting, value );
|
||||
window.setUserSetting( userSetting, value );
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.Settings.AttachmentDisplay
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.Settings.Gallery
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.Settings.Playlist
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.Spinner
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals Backbone, _ */
|
||||
|
||||
/**
|
||||
* wp.media.view.Toolbar
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.Toolbar.Embed
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.Toolbar.Select
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp, jQuery */
|
||||
|
||||
/**
|
||||
* Creates a dropzone on WP editor instances (elements with .wp-editor-wrap
|
||||
* or #wp-fullscreen-body) and relays drag'n'dropped files to a media workflow.
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.UploaderInline
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.UploaderStatusError
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.UploaderStatus
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals _, wp, jQuery */
|
||||
|
||||
/**
|
||||
* wp.media.view.UploaderWindow
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp */
|
||||
|
||||
/**
|
||||
* wp.media.view.VideoDetails
|
||||
*
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/*globals wp */
|
||||
|
||||
/**
|
||||
* wp.media.View
|
||||
*
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-alpha-31384';
|
||||
$wp_version = '4.2-alpha-31385';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue
Block a user