r101572 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101571‎ | r101572 | r101573 >
Date:01:55, 2 November 2011
Author:inez
Status:deferred
Tags:
Comment:
Adjustment for the new data structure
Modified paths:
  • /trunk/parsers/wikidom/lib/hype/views/es.ListView.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/hype/views/es.ListView.js
@@ -28,14 +28,14 @@
2929 es.ListView.prototype.enumerate = function() {
3030 var styles,
3131 levels = [];
32 - for ( var i = 0; i < this.length; i++ ) {
33 - styles = this[i].model.getElementAttribute( 'styles' );
 32+ for ( var i = 0; i < this.children.length; i++ ) {
 33+ styles = this.children[i].model.getElementAttribute( 'styles' );
3434 levels = levels.slice( 0, styles.length );
3535 if ( styles[styles.length - 1] === 'number' ) {
3636 if ( !levels[styles.length - 1] ) {
3737 levels[styles.length - 1] = 0;
3838 }
39 - this[i].setNumber( ++levels[styles.length - 1] );
 39+ this.children[i].setNumber( ++levels[styles.length - 1] );
4040 }
4141 }
4242 };

Status & tagging log