Media JS: Properly fire the Attachment view details method on render. see #21390.

git-svn-id: https://develop.svn.wordpress.org/trunk@22338 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith 2012-10-30 23:41:13 +00:00
parent 6deb5064ee
commit b5652fb180
1 changed files with 4 additions and 3 deletions

View File

@ -1049,7 +1049,8 @@
},
render: function() {
var attachment = this.model.toJSON(),
var state = this.controller.state(),
attachment = this.model.toJSON(),
options = _.defaults( this.model.toJSON(), {
orientation: 'landscape',
uploading: false,
@ -1062,7 +1063,7 @@
});
options.buttons = this.buttons;
options.describe = this.controller.state().get('describe');
options.describe = state.get('describe');
if ( 'image' === options.type )
_.extend( options, this.imageSize() );
@ -1080,7 +1081,7 @@
// Update the model's details view.
this.model.on( 'selection:single selection:unsingle', this.details, this );
this.details();
this.details( this.model, state.get('selection') );
return this;
},