r23943 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23942‎ | r23943 | r23944 >
Date:09:28, 10 July 2007
Author:proes
Status:old
Tags:
Comment:
Fix for sorting columns in Internet Explorer
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/suggest.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/suggest.js
@@ -598,7 +598,7 @@
599599
600600 var result = new Array();
601601
602 - for (i = 0; i < headerRowCount; i++) {
 602+ for (var i = 0; i < headerRowCount; i++) {
603603 var headerRow = tableNode.rows[i];
604604
605605 for (j = 0; j < headerRow.cells.length; j++)
@@ -608,13 +608,13 @@
609609 return result;
610610 }
611611
612 -function nodeHasClass(node, class) {
613 - var classes = node.className.split(' ');
 612+function nodeHasClass(node, className) {
 613+ var nodeClasses = node.className.split(' ');
614614 var result = false;
615615 var i = 0;
616616
617 - while (!result && i < classes.length)
618 - if (classes[i] == class)
 617+ while (!result && i < nodeClasses.length)
 618+ if (nodeClasses[i] == className)
619619 result = true;
620620 else
621621 i++;
@@ -622,13 +622,13 @@
623623 return result;
624624 }
625625
626 -function removeNodeClass(node, class) {
627 - var classes = node.className.split(' ');
 626+function removeNodeClass(node, className) {
 627+ var nodeClasses = node.className.split(' ');
628628 var newClasses = new Array();
629629
630 - for (var i = 0; i < classes.length; i++)
631 - if (classes[i] != class)
632 - newClasses.push(classes[i]);
 630+ for (var i = 0; i < nodeClasses.length; i++)
 631+ if (nodeClasses[i] != className)
 632+ newClasses.push(nodeClasses[i]);
633633
634634 node.className = newClasses.join(" ");
635635 }

Status & tagging log