- md5
- 97c17128e328c279f803558fe3cc4813
- sha1
- 310717fb0b0fcc25150a17a127a9fc93cb27643d
- sha256
- 63fdb51e9bef00ffd24c93ee70cc4f50ae69026e6b191c80ece31cefe147c952
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
/*globals wp, _ */
/**
* wp.media.controller.ImageDetails
*
* A state for editing the attachment display settings of an image that's been
* inserted into the editor.
*
* @class
* @augments wp.media.controller.State
* @augments Backbone.Model
*
* @param {object} [attributes] The attributes hash passed to the state.
* @param {string} [attributes.id=image-details] Unique identifier.
* @param {string} [attributes.title=Image Details] Title for the state. Displays in the frame's title region.
* @param {wp.media.model.Attachment} attributes.image The image's model.
* @param {string|false} [attributes.content=image-details] Initial mode for the content region.
* @param {string|false} [attributes.menu=false] Initial mode for the menu region.
* @param {string|false} [attributes.router=false] Initial mode for the router region.
* @param {string|false} [attributes.toolbar=image-details] Initial mode for the toolbar region.
* @param {boolean} [attributes.editing=false] Unused.
* @param {int} [attributes.priority=60] Unused.
*
* @todo This state inherits some defaults from media.controller.Library.prototype.defaults,
* however this may not do anything.
*/
var State = wp.media.controller.State,
Library = wp.media.controller.Library,
l10n = wp.media.view.l10n,
ImageDetails;
ImageDetails = State.extend({
defaults: _.defaults({
id: 'image-details',
title: l10n.imageDetailsTitle,
content: 'image-details',
menu: false,
router: false,
toolbar: 'image-details',
editing: false,
priority: 60
}, Library.prototype.defaults ),
/**
* @since 3.9.0
*
* @param options Attributes
*/
initialize: function( options ) {
this.image = options.image;
State.prototype.initialize.apply( this, arguments );
},
/**
* @since 3.9.0
*/
activate: function() {
this.frame.modal.$el.addClass('image-details');
}
});
module.exports = ImageDetails;
No other release has this exact content. See every version of this file.