r96510 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96509‎ | r96510 | r96511 >
Date:22:03, 7 September 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Added auto-add feature for view containers.
Modified paths:
  • /trunk/parsers/wikidom/lib/synth/bases/es.ViewContainer.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/synth/bases/es.ViewContainer.js
@@ -74,6 +74,11 @@
7575 container.emit( 'remove', itemView );
7676 container.emit( 'update' );
7777 } );
 78+ // Auto-add views for existing items
 79+ var itemModels = this.containerModel.items();
 80+ for ( var i = 0; i < itemModels.length; i++ ) {
 81+ this.views.push( this.createItemView( itemModels[i] ) );
 82+ }
7883 };
7984
8085 es.ViewContainer.prototype.lookupItemView = function( itemModel ) {

Status & tagging log