Changeset 24367
- Timestamp:
- 05/26/2013 06:34:33 AM (12 years ago)
- Location:
- trunk/wp-includes/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/media-views.js
r24361 r24367 855 855 // This behavior has since been removed, and should not be used 856 856 // outside of the media manager. 857 media.View = wp. View.extend({857 media.View = wp.Backbone.View.extend({ 858 858 constructor: function( options ) { 859 859 if ( options && options.controller ) 860 860 this.controller = options.controller; 861 861 862 wp. View.apply( this, arguments );862 wp.Backbone.View.apply( this, arguments ); 863 863 }, 864 864 … … 884 884 remove: function() { 885 885 this.dispose(); 886 return wp. View.prototype.remove.apply( this, arguments );886 return wp.Backbone.View.prototype.remove.apply( this, arguments ); 887 887 } 888 888 }); -
trunk/wp-includes/js/wp-backbone.js
r24361 r24367 27 27 28 28 29 // wp.Subviews 30 // ----------- 29 // Create the WordPress Backbone namespace. 30 wp.Backbone = {}; 31 32 33 // wp.Backbone.Subviews 34 // -------------------- 31 35 // 32 36 // A subview manager. 33 wp. Subviews = function( view, views ) {37 wp.Backbone.Subviews = function( view, views ) { 34 38 this.view = view; 35 39 this._views = _.isArray( views ) ? { '': views } : views || {}; 36 40 }; 37 41 38 wp. Subviews.extend = Backbone.Model.extend;39 40 _.extend( wp. Subviews.prototype, {42 wp.Backbone.Subviews.extend = Backbone.Model.extend; 43 44 _.extend( wp.Backbone.Subviews.prototype, { 41 45 // ### Fetch all of the subviews 42 46 // … … 139 143 140 144 _.each( views, function( subview ) { 141 var constructor = subview.Views || wp. Subviews,145 var constructor = subview.Views || wp.Backbone.Subviews, 142 146 subviews = subview.views = subview.views || new constructor( subview ); 143 147 subviews.parent = this.view; … … 354 358 355 359 356 // wp. View357 // ------- 360 // wp.Backbone.View 361 // ---------------- 358 362 // 359 363 // The base view class. 360 wp. View = Backbone.View.extend({364 wp.Backbone.View = Backbone.View.extend({ 361 365 // The constructor for the `Views` manager. 362 Subviews: wp. Subviews,366 Subviews: wp.Backbone.Subviews, 363 367 364 368 constructor: function() {
Note: See TracChangeset
for help on using the changeset viewer.