improved the "mark row" feature
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user