diff --git a/ChangeLog b/ChangeLog index 2b9636f42..baf9367ba 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,10 +5,13 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-02-09 Loïc Chapeaux + * libraries/functions.js: improved the "mark row" feature (it wasn't + working with Mozilla, for example). + 2002-02-08 Marc Delisle * ukrainian updates thanks to Markijan Baran. - * tbl_change.php3, remove a weird unset($goto) - and add word wrapping + * tbl_change.php3, remove a weird unset($goto) and add word wrapping. 2002-02-08 Loïc Chapeaux * lang/bulgarian-*; lang/japanese.inc.php3: updated thanks to diff --git a/libraries/functions.js b/libraries/functions.js index 5ec1507e4..d57dd62d6 100644 --- a/libraries/functions.js +++ b/libraries/functions.js @@ -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; } }