Media JS: Improve auto-add functionality in Workspace.render(). see #21390, [21901].
git-svn-id: https://develop.svn.wordpress.org/trunk@21902 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
fd40ade3fb
commit
3d6738c786
|
@ -84,13 +84,13 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
// Renders a view and places it within the modal window.
|
// Renders a view and places it within the modal window.
|
||||||
// Automatically adds a view if `options` are provided.
|
// Automatically adds a view if `constructor` is provided.
|
||||||
render: function( id, options ) {
|
render: function( id, constructor, options ) {
|
||||||
var view;
|
var view;
|
||||||
id = id || this.get('view');
|
id = id || this.get('view');
|
||||||
|
|
||||||
if ( options )
|
if ( constructor )
|
||||||
this.add( id, options );
|
this.add( id, constructor, options );
|
||||||
|
|
||||||
view = this.view( id );
|
view = this.view( id );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue