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

@@ -5,10 +5,13 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2002-02-09 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* libraries/functions.js: improved the "mark row" feature (it wasn't
working with Mozilla, for example).
2002-02-08 Marc Delisle <lem9@users.sourceforge.net> 2002-02-08 Marc Delisle <lem9@users.sourceforge.net>
* ukrainian updates thanks to Markijan Baran. * ukrainian updates thanks to Markijan Baran.
* tbl_change.php3, remove a weird unset($goto) * tbl_change.php3, remove a weird unset($goto) and add word wrapping.
and add word wrapping
2002-02-08 Lo<4C>c Chapeaux <lolo@phpheaven.net> 2002-02-08 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* lang/bulgarian-*; lang/japanese.inc.php3: updated thanks to * lang/bulgarian-*; lang/japanese.inc.php3: updated thanks to

View File

@@ -297,6 +297,12 @@ function checkTransmitDump(theForm, theAction)
} // end of the 'checkTransmitDump()' function } // 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 * Sets/unsets the pointer in browse mode
* *
@@ -324,11 +330,24 @@ function setPointer(theRow, thePointerColor, theNormalBgColor)
} }
var rowCellsCnt = theCells.length; var rowCellsCnt = theCells.length;
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++) { for (var c = 0; c < rowCellsCnt; c++) {
if (theCells[c].style.backgroundColor.toLowerCase() == thePointerColor.toLowerCase()) { theCells[c].setAttribute('bgcolor', newColor, 0);
theCells[c].style.backgroundColor = theNormalBgColor; } // end for
} else { }
theCells[c].style.backgroundColor = thePointerColor; 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;
} }
} }