Media JS: Improve auto-add functionality in Workspace.render(). see #21390, [21901].
git-svn-id: http://core.svn.wordpress.org/trunk@21902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a9ca915252
commit
80e443d0df
|
@ -84,13 +84,13 @@
|
|||
},
|
||||
|
||||
// Renders a view and places it within the modal window.
|
||||
// Automatically adds a view if `options` are provided.
|
||||
render: function( id, options ) {
|
||||
// Automatically adds a view if `constructor` is provided.
|
||||
render: function( id, constructor, options ) {
|
||||
var view;
|
||||
id = id || this.get('view');
|
||||
|
||||
if ( options )
|
||||
this.add( id, options );
|
||||
if ( constructor )
|
||||
this.add( id, constructor, options );
|
||||
|
||||
view = this.view( id );
|
||||
|
||||
|
|
Loading…
Reference in New Issue