Changeset 22710
- Timestamp:
- 11/20/2012 11:57:08 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/media-views.js
r22708 r22710 1532 1532 controller: this, 1533 1533 model: display[ single.cid ], 1534 sizes: single.get('sizes'),1534 attachment: single, 1535 1535 priority: 160, 1536 type: single.get('type'),1537 1536 userSettings: state.get('displayUserSettings') 1538 1537 }).render() … … 3033 3032 3034 3033 initialize: function() { 3034 var attachment = this.options.attachment; 3035 3035 3036 _.defaults( this.options, { 3036 3037 userSettings: false 3037 3038 }); 3039 3038 3040 media.view.Settings.prototype.initialize.apply( this, arguments ); 3039 3041 this.model.on( 'change:link', this.updateCustomLink, this ); 3042 3043 if ( attachment ) 3044 attachment.on( 'change:uploading', this.render, this ); 3045 }, 3046 3047 dispose: function() { 3048 var attachment = this.options.attachment; 3049 if ( attachment ) 3050 attachment.off( null, null, this ); 3051 3052 media.view.Settings.prototype.dispose.apply( this, arguments ); 3040 3053 }, 3041 3054 3042 3055 render: function() { 3056 var attachment = this.options.attachment; 3057 if ( attachment ) { 3058 _.extend( this.options, { 3059 sizes: attachment.get('sizes'), 3060 type: attachment.get('type') 3061 }); 3062 } 3063 3043 3064 media.view.Settings.prototype.render.call( this ); 3044 3065 this.updateCustomLink();
Note: See TracChangeset
for help on using the changeset viewer.