Edit File by line
/home/barbar84/public_h.../wp-inclu.../js
File: media-grid.js
/******/ (function(modules) { // webpackBootstrap
[0] Fix | Delete
/******/ // The module cache
[1] Fix | Delete
/******/ var installedModules = {};
[2] Fix | Delete
/******/
[3] Fix | Delete
/******/ // The require function
[4] Fix | Delete
/******/ function __webpack_require__(moduleId) {
[5] Fix | Delete
/******/
[6] Fix | Delete
/******/ // Check if module is in cache
[7] Fix | Delete
/******/ if(installedModules[moduleId]) {
[8] Fix | Delete
/******/ return installedModules[moduleId].exports;
[9] Fix | Delete
/******/ }
[10] Fix | Delete
/******/ // Create a new module (and put it into the cache)
[11] Fix | Delete
/******/ var module = installedModules[moduleId] = {
[12] Fix | Delete
/******/ i: moduleId,
[13] Fix | Delete
/******/ l: false,
[14] Fix | Delete
/******/ exports: {}
[15] Fix | Delete
/******/ };
[16] Fix | Delete
/******/
[17] Fix | Delete
/******/ // Execute the module function
[18] Fix | Delete
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
[19] Fix | Delete
/******/
[20] Fix | Delete
/******/ // Flag the module as loaded
[21] Fix | Delete
/******/ module.l = true;
[22] Fix | Delete
/******/
[23] Fix | Delete
/******/ // Return the exports of the module
[24] Fix | Delete
/******/ return module.exports;
[25] Fix | Delete
/******/ }
[26] Fix | Delete
/******/
[27] Fix | Delete
/******/
[28] Fix | Delete
/******/ // expose the modules object (__webpack_modules__)
[29] Fix | Delete
/******/ __webpack_require__.m = modules;
[30] Fix | Delete
/******/
[31] Fix | Delete
/******/ // expose the module cache
[32] Fix | Delete
/******/ __webpack_require__.c = installedModules;
[33] Fix | Delete
/******/
[34] Fix | Delete
/******/ // define getter function for harmony exports
[35] Fix | Delete
/******/ __webpack_require__.d = function(exports, name, getter) {
[36] Fix | Delete
/******/ if(!__webpack_require__.o(exports, name)) {
[37] Fix | Delete
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
[38] Fix | Delete
/******/ }
[39] Fix | Delete
/******/ };
[40] Fix | Delete
/******/
[41] Fix | Delete
/******/ // define __esModule on exports
[42] Fix | Delete
/******/ __webpack_require__.r = function(exports) {
[43] Fix | Delete
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
[44] Fix | Delete
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
[45] Fix | Delete
/******/ }
[46] Fix | Delete
/******/ Object.defineProperty(exports, '__esModule', { value: true });
[47] Fix | Delete
/******/ };
[48] Fix | Delete
/******/
[49] Fix | Delete
/******/ // create a fake namespace object
[50] Fix | Delete
/******/ // mode & 1: value is a module id, require it
[51] Fix | Delete
/******/ // mode & 2: merge all properties of value into the ns
[52] Fix | Delete
/******/ // mode & 4: return value when already ns object
[53] Fix | Delete
/******/ // mode & 8|1: behave like require
[54] Fix | Delete
/******/ __webpack_require__.t = function(value, mode) {
[55] Fix | Delete
/******/ if(mode & 1) value = __webpack_require__(value);
[56] Fix | Delete
/******/ if(mode & 8) return value;
[57] Fix | Delete
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
[58] Fix | Delete
/******/ var ns = Object.create(null);
[59] Fix | Delete
/******/ __webpack_require__.r(ns);
[60] Fix | Delete
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
[61] Fix | Delete
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
[62] Fix | Delete
/******/ return ns;
[63] Fix | Delete
/******/ };
[64] Fix | Delete
/******/
[65] Fix | Delete
/******/ // getDefaultExport function for compatibility with non-harmony modules
[66] Fix | Delete
/******/ __webpack_require__.n = function(module) {
[67] Fix | Delete
/******/ var getter = module && module.__esModule ?
[68] Fix | Delete
/******/ function getDefault() { return module['default']; } :
[69] Fix | Delete
/******/ function getModuleExports() { return module; };
[70] Fix | Delete
/******/ __webpack_require__.d(getter, 'a', getter);
[71] Fix | Delete
/******/ return getter;
[72] Fix | Delete
/******/ };
[73] Fix | Delete
/******/
[74] Fix | Delete
/******/ // Object.prototype.hasOwnProperty.call
[75] Fix | Delete
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
[76] Fix | Delete
/******/
[77] Fix | Delete
/******/ // __webpack_public_path__
[78] Fix | Delete
/******/ __webpack_require__.p = "";
[79] Fix | Delete
/******/
[80] Fix | Delete
/******/
[81] Fix | Delete
/******/ // Load entry module and return exports
[82] Fix | Delete
/******/ return __webpack_require__(__webpack_require__.s = 11);
[83] Fix | Delete
/******/ })
[84] Fix | Delete
/************************************************************************/
[85] Fix | Delete
/******/ ([
[86] Fix | Delete
/* 0 */,
[87] Fix | Delete
/* 1 */,
[88] Fix | Delete
/* 2 */,
[89] Fix | Delete
/* 3 */,
[90] Fix | Delete
/* 4 */,
[91] Fix | Delete
/* 5 */,
[92] Fix | Delete
/* 6 */,
[93] Fix | Delete
/* 7 */,
[94] Fix | Delete
/* 8 */,
[95] Fix | Delete
/* 9 */,
[96] Fix | Delete
/* 10 */,
[97] Fix | Delete
/* 11 */
[98] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[99] Fix | Delete
[100] Fix | Delete
module.exports = __webpack_require__(12);
[101] Fix | Delete
[102] Fix | Delete
[103] Fix | Delete
/***/ }),
[104] Fix | Delete
/* 12 */
[105] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[106] Fix | Delete
[107] Fix | Delete
/**
[108] Fix | Delete
* @output wp-includes/js/media-grid.js
[109] Fix | Delete
*/
[110] Fix | Delete
[111] Fix | Delete
var media = wp.media;
[112] Fix | Delete
[113] Fix | Delete
media.controller.EditAttachmentMetadata = __webpack_require__( 13 );
[114] Fix | Delete
media.view.MediaFrame.Manage = __webpack_require__( 14 );
[115] Fix | Delete
media.view.Attachment.Details.TwoColumn = __webpack_require__( 15 );
[116] Fix | Delete
media.view.MediaFrame.Manage.Router = __webpack_require__( 16 );
[117] Fix | Delete
media.view.EditImage.Details = __webpack_require__( 17 );
[118] Fix | Delete
media.view.MediaFrame.EditAttachments = __webpack_require__( 18 );
[119] Fix | Delete
media.view.SelectModeToggleButton = __webpack_require__( 19 );
[120] Fix | Delete
media.view.DeleteSelectedButton = __webpack_require__( 20 );
[121] Fix | Delete
media.view.DeleteSelectedPermanentlyButton = __webpack_require__( 21 );
[122] Fix | Delete
[123] Fix | Delete
[124] Fix | Delete
/***/ }),
[125] Fix | Delete
/* 13 */
[126] Fix | Delete
/***/ (function(module, exports) {
[127] Fix | Delete
[128] Fix | Delete
var l10n = wp.media.view.l10n,
[129] Fix | Delete
EditAttachmentMetadata;
[130] Fix | Delete
[131] Fix | Delete
/**
[132] Fix | Delete
* wp.media.controller.EditAttachmentMetadata
[133] Fix | Delete
*
[134] Fix | Delete
* A state for editing an attachment's metadata.
[135] Fix | Delete
*
[136] Fix | Delete
* @memberOf wp.media.controller
[137] Fix | Delete
*
[138] Fix | Delete
* @class
[139] Fix | Delete
* @augments wp.media.controller.State
[140] Fix | Delete
* @augments Backbone.Model
[141] Fix | Delete
*/
[142] Fix | Delete
EditAttachmentMetadata = wp.media.controller.State.extend(/** @lends wp.media.controller.EditAttachmentMetadata.prototype */{
[143] Fix | Delete
defaults: {
[144] Fix | Delete
id: 'edit-attachment',
[145] Fix | Delete
// Title string passed to the frame's title region view.
[146] Fix | Delete
title: l10n.attachmentDetails,
[147] Fix | Delete
// Region mode defaults.
[148] Fix | Delete
content: 'edit-metadata',
[149] Fix | Delete
menu: false,
[150] Fix | Delete
toolbar: false,
[151] Fix | Delete
router: false
[152] Fix | Delete
}
[153] Fix | Delete
});
[154] Fix | Delete
[155] Fix | Delete
module.exports = EditAttachmentMetadata;
[156] Fix | Delete
[157] Fix | Delete
[158] Fix | Delete
/***/ }),
[159] Fix | Delete
/* 14 */
[160] Fix | Delete
/***/ (function(module, exports) {
[161] Fix | Delete
[162] Fix | Delete
var MediaFrame = wp.media.view.MediaFrame,
[163] Fix | Delete
Library = wp.media.controller.Library,
[164] Fix | Delete
[165] Fix | Delete
$ = Backbone.$,
[166] Fix | Delete
Manage;
[167] Fix | Delete
[168] Fix | Delete
/**
[169] Fix | Delete
* wp.media.view.MediaFrame.Manage
[170] Fix | Delete
*
[171] Fix | Delete
* A generic management frame workflow.
[172] Fix | Delete
*
[173] Fix | Delete
* Used in the media grid view.
[174] Fix | Delete
*
[175] Fix | Delete
* @memberOf wp.media.view.MediaFrame
[176] Fix | Delete
*
[177] Fix | Delete
* @class
[178] Fix | Delete
* @augments wp.media.view.MediaFrame
[179] Fix | Delete
* @augments wp.media.view.Frame
[180] Fix | Delete
* @augments wp.media.View
[181] Fix | Delete
* @augments wp.Backbone.View
[182] Fix | Delete
* @augments Backbone.View
[183] Fix | Delete
* @mixes wp.media.controller.StateMachine
[184] Fix | Delete
*/
[185] Fix | Delete
Manage = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.Manage.prototype */{
[186] Fix | Delete
/**
[187] Fix | Delete
* @constructs
[188] Fix | Delete
*/
[189] Fix | Delete
initialize: function() {
[190] Fix | Delete
_.defaults( this.options, {
[191] Fix | Delete
title: '',
[192] Fix | Delete
modal: false,
[193] Fix | Delete
selection: [],
[194] Fix | Delete
library: {}, // Options hash for the query to the media library.
[195] Fix | Delete
multiple: 'add',
[196] Fix | Delete
state: 'library',
[197] Fix | Delete
uploader: true,
[198] Fix | Delete
mode: [ 'grid', 'edit' ]
[199] Fix | Delete
});
[200] Fix | Delete
[201] Fix | Delete
this.$body = $( document.body );
[202] Fix | Delete
this.$window = $( window );
[203] Fix | Delete
this.$adminBar = $( '#wpadminbar' );
[204] Fix | Delete
// Store the Add New button for later reuse in wp.media.view.UploaderInline.
[205] Fix | Delete
this.$uploaderToggler = $( '.page-title-action' )
[206] Fix | Delete
.attr( 'aria-expanded', 'false' )
[207] Fix | Delete
.on( 'click', _.bind( this.addNewClickHandler, this ) );
[208] Fix | Delete
[209] Fix | Delete
this.$window.on( 'scroll resize', _.debounce( _.bind( this.fixPosition, this ), 15 ) );
[210] Fix | Delete
[211] Fix | Delete
// Ensure core and media grid view UI is enabled.
[212] Fix | Delete
this.$el.addClass('wp-core-ui');
[213] Fix | Delete
[214] Fix | Delete
// Force the uploader off if the upload limit has been exceeded or
[215] Fix | Delete
// if the browser isn't supported.
[216] Fix | Delete
if ( wp.Uploader.limitExceeded || ! wp.Uploader.browser.supported ) {
[217] Fix | Delete
this.options.uploader = false;
[218] Fix | Delete
}
[219] Fix | Delete
[220] Fix | Delete
// Initialize a window-wide uploader.
[221] Fix | Delete
if ( this.options.uploader ) {
[222] Fix | Delete
this.uploader = new wp.media.view.UploaderWindow({
[223] Fix | Delete
controller: this,
[224] Fix | Delete
uploader: {
[225] Fix | Delete
dropzone: document.body,
[226] Fix | Delete
container: document.body
[227] Fix | Delete
}
[228] Fix | Delete
}).render();
[229] Fix | Delete
this.uploader.ready();
[230] Fix | Delete
$('body').append( this.uploader.el );
[231] Fix | Delete
[232] Fix | Delete
this.options.uploader = false;
[233] Fix | Delete
}
[234] Fix | Delete
[235] Fix | Delete
this.gridRouter = new wp.media.view.MediaFrame.Manage.Router();
[236] Fix | Delete
[237] Fix | Delete
// Call 'initialize' directly on the parent class.
[238] Fix | Delete
MediaFrame.prototype.initialize.apply( this, arguments );
[239] Fix | Delete
[240] Fix | Delete
// Append the frame view directly the supplied container.
[241] Fix | Delete
this.$el.appendTo( this.options.container );
[242] Fix | Delete
[243] Fix | Delete
this.createStates();
[244] Fix | Delete
this.bindRegionModeHandlers();
[245] Fix | Delete
this.render();
[246] Fix | Delete
this.bindSearchHandler();
[247] Fix | Delete
[248] Fix | Delete
wp.media.frames.browse = this;
[249] Fix | Delete
},
[250] Fix | Delete
[251] Fix | Delete
bindSearchHandler: function() {
[252] Fix | Delete
var search = this.$( '#media-search-input' ),
[253] Fix | Delete
searchView = this.browserView.toolbar.get( 'search' ).$el,
[254] Fix | Delete
listMode = this.$( '.view-list' ),
[255] Fix | Delete
[256] Fix | Delete
input = _.throttle( function (e) {
[257] Fix | Delete
var val = $( e.currentTarget ).val(),
[258] Fix | Delete
url = '';
[259] Fix | Delete
[260] Fix | Delete
if ( val ) {
[261] Fix | Delete
url += '?search=' + val;
[262] Fix | Delete
this.gridRouter.navigate( this.gridRouter.baseUrl( url ), { replace: true } );
[263] Fix | Delete
}
[264] Fix | Delete
}, 1000 );
[265] Fix | Delete
[266] Fix | Delete
// Update the URL when entering search string (at most once per second).
[267] Fix | Delete
search.on( 'input', _.bind( input, this ) );
[268] Fix | Delete
[269] Fix | Delete
this.gridRouter
[270] Fix | Delete
.on( 'route:search', function () {
[271] Fix | Delete
var href = window.location.href;
[272] Fix | Delete
if ( href.indexOf( 'mode=' ) > -1 ) {
[273] Fix | Delete
href = href.replace( /mode=[^&]+/g, 'mode=list' );
[274] Fix | Delete
} else {
[275] Fix | Delete
href += href.indexOf( '?' ) > -1 ? '&mode=list' : '?mode=list';
[276] Fix | Delete
}
[277] Fix | Delete
href = href.replace( 'search=', 's=' );
[278] Fix | Delete
listMode.prop( 'href', href );
[279] Fix | Delete
})
[280] Fix | Delete
.on( 'route:reset', function() {
[281] Fix | Delete
searchView.val( '' ).trigger( 'input' );
[282] Fix | Delete
});
[283] Fix | Delete
},
[284] Fix | Delete
[285] Fix | Delete
/**
[286] Fix | Delete
* Create the default states for the frame.
[287] Fix | Delete
*/
[288] Fix | Delete
createStates: function() {
[289] Fix | Delete
var options = this.options;
[290] Fix | Delete
[291] Fix | Delete
if ( this.options.states ) {
[292] Fix | Delete
return;
[293] Fix | Delete
}
[294] Fix | Delete
[295] Fix | Delete
// Add the default states.
[296] Fix | Delete
this.states.add([
[297] Fix | Delete
new Library({
[298] Fix | Delete
library: wp.media.query( options.library ),
[299] Fix | Delete
multiple: options.multiple,
[300] Fix | Delete
title: options.title,
[301] Fix | Delete
content: 'browse',
[302] Fix | Delete
toolbar: 'select',
[303] Fix | Delete
contentUserSetting: false,
[304] Fix | Delete
filterable: 'all',
[305] Fix | Delete
autoSelect: false
[306] Fix | Delete
})
[307] Fix | Delete
]);
[308] Fix | Delete
},
[309] Fix | Delete
[310] Fix | Delete
/**
[311] Fix | Delete
* Bind region mode activation events to proper handlers.
[312] Fix | Delete
*/
[313] Fix | Delete
bindRegionModeHandlers: function() {
[314] Fix | Delete
this.on( 'content:create:browse', this.browseContent, this );
[315] Fix | Delete
[316] Fix | Delete
// Handle a frame-level event for editing an attachment.
[317] Fix | Delete
this.on( 'edit:attachment', this.openEditAttachmentModal, this );
[318] Fix | Delete
[319] Fix | Delete
this.on( 'select:activate', this.bindKeydown, this );
[320] Fix | Delete
this.on( 'select:deactivate', this.unbindKeydown, this );
[321] Fix | Delete
},
[322] Fix | Delete
[323] Fix | Delete
handleKeydown: function( e ) {
[324] Fix | Delete
if ( 27 === e.which ) {
[325] Fix | Delete
e.preventDefault();
[326] Fix | Delete
this.deactivateMode( 'select' ).activateMode( 'edit' );
[327] Fix | Delete
}
[328] Fix | Delete
},
[329] Fix | Delete
[330] Fix | Delete
bindKeydown: function() {
[331] Fix | Delete
this.$body.on( 'keydown.select', _.bind( this.handleKeydown, this ) );
[332] Fix | Delete
},
[333] Fix | Delete
[334] Fix | Delete
unbindKeydown: function() {
[335] Fix | Delete
this.$body.off( 'keydown.select' );
[336] Fix | Delete
},
[337] Fix | Delete
[338] Fix | Delete
fixPosition: function() {
[339] Fix | Delete
var $browser, $toolbar;
[340] Fix | Delete
if ( ! this.isModeActive( 'select' ) ) {
[341] Fix | Delete
return;
[342] Fix | Delete
}
[343] Fix | Delete
[344] Fix | Delete
$browser = this.$('.attachments-browser');
[345] Fix | Delete
$toolbar = $browser.find('.media-toolbar');
[346] Fix | Delete
[347] Fix | Delete
// Offset doesn't appear to take top margin into account, hence +16.
[348] Fix | Delete
if ( ( $browser.offset().top + 16 ) < this.$window.scrollTop() + this.$adminBar.height() ) {
[349] Fix | Delete
$browser.addClass( 'fixed' );
[350] Fix | Delete
$toolbar.css('width', $browser.width() + 'px');
[351] Fix | Delete
} else {
[352] Fix | Delete
$browser.removeClass( 'fixed' );
[353] Fix | Delete
$toolbar.css('width', '');
[354] Fix | Delete
}
[355] Fix | Delete
},
[356] Fix | Delete
[357] Fix | Delete
/**
[358] Fix | Delete
* Click handler for the `Add New` button.
[359] Fix | Delete
*/
[360] Fix | Delete
addNewClickHandler: function( event ) {
[361] Fix | Delete
event.preventDefault();
[362] Fix | Delete
this.trigger( 'toggle:upload:attachment' );
[363] Fix | Delete
[364] Fix | Delete
if ( this.uploader ) {
[365] Fix | Delete
this.uploader.refresh();
[366] Fix | Delete
}
[367] Fix | Delete
},
[368] Fix | Delete
[369] Fix | Delete
/**
[370] Fix | Delete
* Open the Edit Attachment modal.
[371] Fix | Delete
*/
[372] Fix | Delete
openEditAttachmentModal: function( model ) {
[373] Fix | Delete
// Create a new EditAttachment frame, passing along the library and the attachment model.
[374] Fix | Delete
if ( wp.media.frames.edit ) {
[375] Fix | Delete
wp.media.frames.edit.open().trigger( 'refresh', model );
[376] Fix | Delete
} else {
[377] Fix | Delete
wp.media.frames.edit = wp.media( {
[378] Fix | Delete
frame: 'edit-attachments',
[379] Fix | Delete
controller: this,
[380] Fix | Delete
library: this.state().get('library'),
[381] Fix | Delete
model: model
[382] Fix | Delete
} );
[383] Fix | Delete
}
[384] Fix | Delete
},
[385] Fix | Delete
[386] Fix | Delete
/**
[387] Fix | Delete
* Create an attachments browser view within the content region.
[388] Fix | Delete
*
[389] Fix | Delete
* @param {Object} contentRegion Basic object with a `view` property, which
[390] Fix | Delete
* should be set with the proper region view.
[391] Fix | Delete
* @this wp.media.controller.Region
[392] Fix | Delete
*/
[393] Fix | Delete
browseContent: function( contentRegion ) {
[394] Fix | Delete
var state = this.state();
[395] Fix | Delete
[396] Fix | Delete
// Browse our library of attachments.
[397] Fix | Delete
this.browserView = contentRegion.view = new wp.media.view.AttachmentsBrowser({
[398] Fix | Delete
controller: this,
[399] Fix | Delete
collection: state.get('library'),
[400] Fix | Delete
selection: state.get('selection'),
[401] Fix | Delete
model: state,
[402] Fix | Delete
sortable: state.get('sortable'),
[403] Fix | Delete
search: state.get('searchable'),
[404] Fix | Delete
filters: state.get('filterable'),
[405] Fix | Delete
date: state.get('date'),
[406] Fix | Delete
display: state.get('displaySettings'),
[407] Fix | Delete
dragInfo: state.get('dragInfo'),
[408] Fix | Delete
sidebar: 'errors',
[409] Fix | Delete
[410] Fix | Delete
suggestedWidth: state.get('suggestedWidth'),
[411] Fix | Delete
suggestedHeight: state.get('suggestedHeight'),
[412] Fix | Delete
[413] Fix | Delete
AttachmentView: state.get('AttachmentView'),
[414] Fix | Delete
[415] Fix | Delete
scrollElement: document
[416] Fix | Delete
});
[417] Fix | Delete
this.browserView.on( 'ready', _.bind( this.bindDeferred, this ) );
[418] Fix | Delete
[419] Fix | Delete
this.errors = wp.Uploader.errors;
[420] Fix | Delete
this.errors.on( 'add remove reset', this.sidebarVisibility, this );
[421] Fix | Delete
},
[422] Fix | Delete
[423] Fix | Delete
sidebarVisibility: function() {
[424] Fix | Delete
this.browserView.$( '.media-sidebar' ).toggle( !! this.errors.length );
[425] Fix | Delete
},
[426] Fix | Delete
[427] Fix | Delete
bindDeferred: function() {
[428] Fix | Delete
if ( ! this.browserView.dfd ) {
[429] Fix | Delete
return;
[430] Fix | Delete
}
[431] Fix | Delete
this.browserView.dfd.done( _.bind( this.startHistory, this ) );
[432] Fix | Delete
},
[433] Fix | Delete
[434] Fix | Delete
startHistory: function() {
[435] Fix | Delete
// Verify pushState support and activate.
[436] Fix | Delete
if ( window.history && window.history.pushState ) {
[437] Fix | Delete
if ( Backbone.History.started ) {
[438] Fix | Delete
Backbone.history.stop();
[439] Fix | Delete
}
[440] Fix | Delete
Backbone.history.start( {
[441] Fix | Delete
root: window._wpMediaGridSettings.adminUrl,
[442] Fix | Delete
pushState: true
[443] Fix | Delete
} );
[444] Fix | Delete
}
[445] Fix | Delete
}
[446] Fix | Delete
});
[447] Fix | Delete
[448] Fix | Delete
module.exports = Manage;
[449] Fix | Delete
[450] Fix | Delete
[451] Fix | Delete
/***/ }),
[452] Fix | Delete
/* 15 */
[453] Fix | Delete
/***/ (function(module, exports) {
[454] Fix | Delete
[455] Fix | Delete
var Details = wp.media.view.Attachment.Details,
[456] Fix | Delete
TwoColumn;
[457] Fix | Delete
[458] Fix | Delete
/**
[459] Fix | Delete
* wp.media.view.Attachment.Details.TwoColumn
[460] Fix | Delete
*
[461] Fix | Delete
* A similar view to media.view.Attachment.Details
[462] Fix | Delete
* for use in the Edit Attachment modal.
[463] Fix | Delete
*
[464] Fix | Delete
* @memberOf wp.media.view.Attachment.Details
[465] Fix | Delete
*
[466] Fix | Delete
* @class
[467] Fix | Delete
* @augments wp.media.view.Attachment.Details
[468] Fix | Delete
* @augments wp.media.view.Attachment
[469] Fix | Delete
* @augments wp.media.View
[470] Fix | Delete
* @augments wp.Backbone.View
[471] Fix | Delete
* @augments Backbone.View
[472] Fix | Delete
*/
[473] Fix | Delete
TwoColumn = Details.extend(/** @lends wp.media.view.Attachment.Details.TowColumn.prototype */{
[474] Fix | Delete
template: wp.template( 'attachment-details-two-column' ),
[475] Fix | Delete
[476] Fix | Delete
initialize: function() {
[477] Fix | Delete
this.controller.on( 'content:activate:edit-details', _.bind( this.editAttachment, this ) );
[478] Fix | Delete
[479] Fix | Delete
Details.prototype.initialize.apply( this, arguments );
[480] Fix | Delete
},
[481] Fix | Delete
[482] Fix | Delete
editAttachment: function( event ) {
[483] Fix | Delete
if ( event ) {
[484] Fix | Delete
event.preventDefault();
[485] Fix | Delete
}
[486] Fix | Delete
this.controller.content.mode( 'edit-image' );
[487] Fix | Delete
},
[488] Fix | Delete
[489] Fix | Delete
/**
[490] Fix | Delete
* Noop this from parent class, doesn't apply here.
[491] Fix | Delete
*/
[492] Fix | Delete
toggleSelectionHandler: function() {}
[493] Fix | Delete
[494] Fix | Delete
});
[495] Fix | Delete
[496] Fix | Delete
module.exports = TwoColumn;
[497] Fix | Delete
[498] Fix | Delete
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function