WordPress.org

Make WordPress Core

Changeset 22338


Ignore:
Timestamp:
10/30/2012 11:41:13 PM (8 years ago)
Author:
koopersmith
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/media-views.js

    r22337 r22338  
    10501050
    10511051        render: function() {
    1052             var attachment = this.model.toJSON(),
     1052            var state = this.controller.state(),
     1053                attachment = this.model.toJSON(),
    10531054                options = _.defaults( this.model.toJSON(), {
    10541055                    orientation: 'landscape',
     
    10631064
    10641065            options.buttons  = this.buttons;
    1065             options.describe = this.controller.state().get('describe');
     1066            options.describe = state.get('describe');
    10661067
    10671068            if ( 'image' === options.type )
     
    10811082            // Update the model's details view.
    10821083            this.model.on( 'selection:single selection:unsingle', this.details, this );
    1083             this.details();
     1084            this.details( this.model, state.get('selection') );
    10841085
    10851086            return this;
Note: See TracChangeset for help on using the changeset viewer.