Media: Convert the attachments browser to use internal views. see #21390.

git-svn-id: http://core.svn.wordpress.org/trunk@22804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Daryl Koopersmith 2012-11-22 01:43:31 +00:00
parent adad154f6b
commit f80e93ebf8
1 changed files with 4 additions and 13 deletions

View File

@ -2192,7 +2192,7 @@
this.set( _.extend( {}, this._views, this.options.views ), { silent: true });
delete this.options.views;
// if ( ! this.options.silent )
if ( ! this.options.silent )
this.render();
},
@ -2894,6 +2894,8 @@
controller: this.controller
});
this.views.add( this.toolbar );
filters = this.options.filters;
if ( 'uploaded' === filters )
FiltersConstructor = media.view.AttachmentFilters.Uploaded;
@ -2942,19 +2944,8 @@
// The single `Attachment` view to be used in the `Attachments` view.
AttachmentView: this.options.AttachmentView
});
},
dispose: function() {
this.toolbar.destroy();
this.attachments.destroy();
media.View.prototype.dispose.apply( this, arguments );
},
render: function() {
this.toolbar.$el.detach();
this.attachments.$el.detach();
this.$el.html([ this.toolbar.render().el, this.attachments.render().el ]);
return this;
this.views.add( this.attachments );
}
});