Changeset 31045
- Timestamp:
- 01/04/2015 05:24:24 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/media-views.js
r31039 r31045 4660 4660 }, this ); 4661 4661 4662 this. model.on( 'change', this.render, this);4662 this.listenTo( this.model, 'change', this.render ); 4663 4663 }, 4664 4664 /** … … 5119 5119 5120 5120 if ( options.rerenderOnModelChange ) { 5121 this. model.on( 'change', this.render, this);5121 this.listenTo( this.model, 'change', this.render ); 5122 5122 } else { 5123 this. model.on( 'change:percent', this.progress, this );5124 } 5125 this. model.on( 'change:title', this._syncTitle, this);5126 this. model.on( 'change:caption', this._syncCaption, this);5127 this. model.on( 'change:artist', this._syncArtist, this);5128 this. model.on( 'change:album', this._syncAlbum, this);5123 this.listenTo( this.model, 'change:percent', this.progress ); 5124 } 5125 this.listenTo( this.model, 'change:title', this._syncTitle ); 5126 this.listenTo( this.model, 'change:caption', this._syncCaption ); 5127 this.listenTo( this.model, 'change:artist', this._syncArtist ); 5128 this.listenTo( this.model, 'change:album', this._syncAlbum ); 5129 5129 5130 5130 // Update the selection. 5131 this. model.on( 'add', this.select, this);5132 this. model.on( 'remove', this.deselect, this);5131 this.listenTo( this.model, 'add', this.select ); 5132 this.listenTo( this.model, 'remove', this.deselect ); 5133 5133 if ( selection ) { 5134 5134 selection.on( 'reset', this.updateSelect, this ); 5135 5135 // Update the model's details view. 5136 this. model.on( 'selection:single selection:unsingle', this.details, this );5136 this.listenTo( this.model, 'selection:single selection:unsingle', this.details ); 5137 5137 this.details( this.model, this.controller.state().get('selection') ); 5138 5138 } … … 6016 6016 }, this ).sortBy('priority').pluck('el').value() ); 6017 6017 6018 this. model.on( 'change', this.select, this);6018 this.listenTo( this.model, 'change', this.select ); 6019 6019 this.select(); 6020 6020 }, … … 6819 6819 initialize: function() { 6820 6820 this.model = this.model || new Backbone.Model(); 6821 this. model.on( 'change', this.updateChanges, this );6821 this.listenTo( this.model, 'change', this.updateChanges ); 6822 6822 }, 6823 6823 … … 6936 6936 // Call 'initialize' directly on the parent class. 6937 6937 media.view.Settings.prototype.initialize.apply( this, arguments ); 6938 this. model.on( 'change:link', this.updateLinkTo, this);6938 this.listenTo( this.model, 'change:link', this.updateLinkTo ); 6939 6939 6940 6940 if ( attachment ) { … … 7186 7186 7187 7187 initialize: function() { 7188 this. model.on( 'change:compat', this.render, this);7188 this.listenTo( this.model, 'change:compat', this.render ); 7189 7189 }, 7190 7190 /** … … 7286 7286 this.views.set([ this.url ]); 7287 7287 this.refresh(); 7288 this. model.on( 'change:type', this.refresh, this);7289 this. model.on( 'change:loading', this.loading, this);7288 this.listenTo( this.model, 'change:type', this.refresh ); 7289 this.listenTo( this.model, 'change:loading', this.loading ); 7290 7290 }, 7291 7291 … … 7373 7373 this.$el.append([ this.input, this.spinner ]); 7374 7374 7375 this. model.on( 'change:url', this.render, this);7375 this.listenTo( this.model, 'change:url', this.render ); 7376 7376 7377 7377 if ( this.model.get( 'url' ) ) { … … 7499 7499 */ 7500 7500 media.view.Settings.AttachmentDisplay.prototype.initialize.apply( this, arguments ); 7501 this. model.on( 'change:url', this.updateImage, this);7501 this.listenTo( this.model, 'change:url', this.updateImage ); 7502 7502 }, 7503 7503
Note: See TracChangeset
for help on using the changeset viewer.