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

git-svn-id: http://core.svn.wordpress.org/trunk@22338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Daryl Koopersmith 2012-10-30 23:41:13 +00:00
parent efea572e91
commit fcde71fd77
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;
},