Changeset 21821
- Timestamp:
- 09/11/2012 09:21:32 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/media-views.js
r21820 r21821 32 32 33 33 // Add default views. 34 this.add( 'library', {35 view: media.view.Workspace36 }); 37 }, 38 39 40 // Accepts an `id` and `options` for a view. Options isan object that34 this.add( 'library', media.view.Workspace ); 35 }, 36 37 38 // Accepts an `id` and `options` for a view. 39 // 40 // `options` is either a `Backbone.View` constructor or an object that 41 41 // contains two keys: the `view` key is a `Backbone.View` constructor, 42 42 // and the `options` key are the options to be passed when the view is … … 46 46 add: function( id, options ) { 47 47 this.remove( id ); 48 if ( _.isFunction( options ) ) 49 options = { view: options }; 48 50 this._pending[ id ] = options; 49 51 this.trigger( 'add add:' + id, options );
Note: See TracChangeset
for help on using the changeset viewer.