Changeset 22738
- Timestamp:
- 11/21/2012 08:17:45 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/media-views.js
r22716 r22738 312 312 this.get('selection').off( null, null, this ); 313 313 314 wp.Uploader.queue.off( 'add', this.selectUpload, this );314 wp.Uploader.queue.off( null, null, this ); 315 315 316 316 this.off( 'change:excludeState', this._excludeState, this ); … … 499 499 this.set( 'AttachmentView', media.view.Attachment.EditLibrary ); 500 500 media.controller.Library.prototype.initialize.apply( this, arguments ); 501 }, 502 503 activate: function() { 504 var library = this.get('library'); 505 506 // Limit the library to images only. 507 library.props.set( 'type', 'image' ); 508 console.log('set', library.props.toJSON(), library.filters ); 509 510 // Watch for uploaded attachments. 511 this.get('library').observe( wp.Uploader.queue ); 512 513 media.controller.Library.prototype.activate.apply( this, arguments ); 514 }, 515 516 deactivate: function() { 517 // Stop watching for uploaded attachments. 518 this.get('library').unobserve( wp.Uploader.queue ); 519 media.controller.Library.prototype.deactivate.apply( this, arguments ); 501 520 }, 502 521
Note: See TracChangeset
for help on using the changeset viewer.