Media: Make inline uploader use main dispose method. see #21390.

git-svn-id: https://develop.svn.wordpress.org/trunk@22787 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith 2012-11-21 19:54:06 +00:00
parent 45f6cf2fb5
commit 6423fba2c4

View File

@ -1809,9 +1809,10 @@
wp.Uploader.queue.on( 'add remove reset change:percent', this.renderUploadProgress, this ); wp.Uploader.queue.on( 'add remove reset change:percent', this.renderUploadProgress, this );
}, },
destroy: function() { dispose: function() {
wp.Uploader.queue.off( 'add remove reset change:percent', this.renderUploadProgress, this ); wp.Uploader.queue.off( null, null, this );
this.remove(); media.View.prototype.dispose.apply( this, arguments );
return this;
}, },
render: function() { render: function() {
@ -1827,6 +1828,8 @@
$placeholder.replaceWith( $browser.show() ); $placeholder.replaceWith( $browser.show() );
this.$bar = this.$('.media-progress-bar div'); this.$bar = this.$('.media-progress-bar div');
this.views.render();
return this; return this;
}, },