r105000 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104999‎ | r105000 | r105001 >
Date:20:41, 2 December 2011
Author:inez
Status:deferred
Tags:
Comment:
Rename function and comment it
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/tools/es.ListButtonTool.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/tools/es.ListButtonTool.js
@@ -7,7 +7,8 @@
88 };
99
1010 es.ListButtonTool.prototype.updateState = function( annotations, nodes ) {
11 - function areSameTypeAndStyle( nodes, style ) {
 11+ // checks if all passed nodes are listItems of passed style
 12+ function check( nodes, style ) {
1213 for( var i = 0; i < nodes.length; i++ ) {
1314 parent = nodes[i].getParent();
1415 if ( parent.getElementType() !== 'listItem' ) {
@@ -21,7 +22,7 @@
2223 return true;
2324 }
2425
25 - if ( areSameTypeAndStyle( nodes, this.name ) ) {
 26+ if ( check( nodes, this.name ) ) {
2627 this.$.addClass( 'es-toolbarButtonTool-down' );
2728 } else {
2829 this.$.removeClass( 'es-toolbarButtonTool-down' );

Status & tagging log