mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Make ListView.enumerate method clear ListItemView.$icon when item is not 'number'.
This commit is contained in:
parent
45634a8208
commit
0ec2775621
|
@ -47,10 +47,6 @@ es.ListItemView.prototype.setClasses = function() {
|
|||
}
|
||||
};
|
||||
|
||||
es.ListItemView.prototype.setNumber = function( number ) {
|
||||
this.$icon.text( number + '.' );
|
||||
};
|
||||
|
||||
/* Registration */
|
||||
|
||||
es.DocumentView.splitRules.listItem = {
|
||||
|
|
|
@ -37,7 +37,9 @@ es.ListView.prototype.enumerate = function() {
|
|||
if ( !levels[styles.length - 1] ) {
|
||||
levels[styles.length - 1] = 0;
|
||||
}
|
||||
this.children[i].setNumber( ++levels[styles.length - 1] );
|
||||
this.children[i].$icon.text( number + '.' );
|
||||
} else {
|
||||
this.children[i].$icon.text( '' );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue