2015-02-22 07:56:27 +01:00
|
|
|
/*globals wp, _ */
|
2015-02-22 07:21:25 +01:00
|
|
|
|
2015-02-22 08:25:27 +01:00
|
|
|
/**
|
|
|
|
* wp.media.view.EditImage.Details
|
|
|
|
*
|
|
|
|
* @class
|
2015-02-22 09:47:25 +01:00
|
|
|
* @augments wp.media.view.EditImage
|
2015-02-22 08:25:27 +01:00
|
|
|
* @augments wp.media.View
|
|
|
|
* @augments wp.Backbone.View
|
|
|
|
* @augments Backbone.View
|
|
|
|
*/
|
2015-02-22 09:47:25 +01:00
|
|
|
var View = wp.media.View,
|
2015-02-22 07:21:25 +01:00
|
|
|
EditImage = wp.media.view.EditImage,
|
2015-02-09 01:43:50 +01:00
|
|
|
Details;
|
|
|
|
|
|
|
|
Details = EditImage.extend({
|
|
|
|
initialize: function( options ) {
|
|
|
|
this.editor = window.imageEdit;
|
|
|
|
this.frame = options.frame;
|
|
|
|
this.controller = options.controller;
|
|
|
|
View.prototype.initialize.apply( this, arguments );
|
|
|
|
},
|
|
|
|
|
|
|
|
back: function() {
|
|
|
|
this.frame.content.mode( 'edit-metadata' );
|
|
|
|
},
|
|
|
|
|
|
|
|
save: function() {
|
2015-02-09 05:45:28 +01:00
|
|
|
this.model.fetch().done( _.bind( function() {
|
|
|
|
this.frame.content.mode( 'edit-metadata' );
|
|
|
|
}, this ) );
|
2015-02-09 01:43:50 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2015-02-09 17:01:29 +01:00
|
|
|
module.exports = Details;
|