Changeset 22454
- Timestamp:
- 11/07/2012 10:43:16 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/media-views.js
r22437 r22454 102 102 103 103 if ( previous ) { 104 // Replace the view in place. 105 previous.$el.replaceWith( view.$el ); 106 104 107 // Fire the view's `destroy` event if it exists. 105 108 if ( previous.destroy ) … … 107 110 // Undelegate events. 108 111 previous.undelegateEvents(); 109 110 // Replace the view in place.111 previous.$el.replaceWith( view.$el );112 112 } 113 113 … … 1068 1068 destroy: function() { 1069 1069 wp.Uploader.queue.off( 'add remove reset change:percent', this.renderUploadProgress, this ); 1070 this.remove(); 1070 1071 }, 1071 1072 … … 1125 1126 1126 1127 destroy: function() { 1128 this.remove(); 1127 1129 _.each( this._views, function( view ) { 1128 1130 if ( view.destroy ) … … 1405 1407 1406 1408 destroy: function() { 1409 this.remove(); 1407 1410 _.each( this._views, function( view ) { 1408 1411 if ( view.destroy ) … … 1563 1566 this.model.off( null, null, this ); 1564 1567 this.$el.off( 'click', 'a', this.preventDefault ); 1568 this.remove(); 1565 1569 }, 1566 1570 … … 1754 1758 this.model.off( 'change:edge change:gutter', this.css, this ); 1755 1759 $(window).off( 'resize.attachments', this._resizeCss ); 1760 this.remove(); 1756 1761 }, 1757 1762 … … 1963 1968 AttachmentView: this.options.AttachmentView 1964 1969 }); 1970 }, 1971 1972 destroy: function() { 1973 this.remove(); 1974 this.toolbar.destroy(); 1975 this.attachments.destroy(); 1965 1976 }, 1966 1977 … … 2059 2070 2060 2071 destroy: function() { 2072 this.remove(); 2061 2073 this.collection.off( 'add remove reset', this.refresh, this ); 2074 this.attachments.destroy(); 2062 2075 }, 2063 2076
Note: See TracChangeset
for help on using the changeset viewer.