Changeset 22649
- Timestamp:
- 11/19/2012 12:54:18 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/media-views.js
r22648 r22649 605 605 606 606 _.each( views, function( subview ) { 607 var subviews = subview.views = subview.views || new this.constructor( subview ); 607 var constructor = subview.Views || media.Views, 608 subviews = subview.views = subview.views || new constructor( subview ); 608 609 subviews.parent = this.view; 609 610 subviews.selector = selector; … … 657 658 658 659 replace: function( $target, els ) { 659 if ( this.view.replace )660 return this.view.replace( $target, els );661 662 660 $target.html( els ); 661 return this; 663 662 }, 664 663 665 664 attach: function( $target, els ) { 666 if ( this.view.attach )667 return this.view.attach( $target, els );668 669 665 $target.append( els ); 666 return this; 670 667 } 671 668 }); … … 676 673 // The base view class. 677 674 media.View = Backbone.View.extend({ 675 // The constructor for the `Views` manager. 676 Views: media.Views, 677 678 678 constructor: function() { 679 this.views = new media.Views( this, this.views );679 this.views = new this.Views( this, this.views ); 680 680 Backbone.View.apply( this, arguments ); 681 681 },
Note: See TracChangeset
for help on using the changeset viewer.