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

git-svn-id: http://core.svn.wordpress.org/trunk@22787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Daryl Koopersmith 2012-11-21 19:54:06 +00:00
parent f8630d2be3
commit 1480429ec0

View File

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