improved the "mark row" feature

This commit is contained in:
Loïc Chapeaux
2002-02-09 10:46:45 +00:00
parent 2bbe906df8
commit df0a1f259f
2 changed files with 29 additions and 7 deletions

View File

@@ -297,6 +297,12 @@ function checkTransmitDump(theForm, theAction)
} // end of the 'checkTransmitDump()' function
/**
* The global array below will be used inside the "setPointer()" function
*/
var markedRow = new Array();
/**
* Sets/unsets the pointer in browse mode
*
@@ -324,11 +330,24 @@ function setPointer(theRow, thePointerColor, theNormalBgColor)
}
var rowCellsCnt = theCells.length;
for (var c = 0; c < rowCellsCnt; c++) {
if (theCells[c].style.backgroundColor.toLowerCase() == thePointerColor.toLowerCase()) {
theCells[c].style.backgroundColor = theNormalBgColor;
} else {
theCells[c].style.backgroundColor = thePointerColor;
var currentColor = null;
var newColor = null;
if (typeof(theCells[0].getAttribute) != 'undefined' && typeof(theCells[0].getAttribute) != 'undefined') {
currentColor = theCells[0].getAttribute('bgcolor');
newColor = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
? theNormalBgColor
: thePointerColor;
for (var c = 0; c < rowCellsCnt; c++) {
theCells[c].setAttribute('bgcolor', newColor, 0);
} // end for
}
else {
currentColor = theCells[0].style.backgroundColor;
newColor = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
? theNormalBgColor
: thePointerColor;
for (var c = 0; c < rowCellsCnt; c++) {
theCells[c].style.backgroundColor = newColor;
}
}