[Phpmyadmin-devel] [PATCH] BrowsePointer - new behaviour

Wolfram Schlich lists at schlich.org
Mon Jan 21 04:44:03 CET 2002


Hello,
attached you find a patch (two files) for 2.2.3 which changes the
BrowsePointer behaviour: now a row gets marked when you click on
it, and un-marked when you click on it again. It does not trigger
un-marking of other marked rows, as this would have been fairly too
difficult for me now and it perhaps could be useful to have the
possibility to mark several rows at a time, e.g. for comparing
reasons. Hope you like it and therefore could perhaps include this
funcionality in the next release or something. Maybe you'd want it
for 2.2.4-cvs? Then just drop me a line (haven't tried this one yet).
Thanks.
-- 
Mit freundlichen Gruessen / Yours sincerely
Wolfram Schlich; Berghof, D-56626 Andernach-Kell; +49-(0)2636-941194;
-------------- next part --------------
--- phpMyAdmin-2.2.3-orig/libraries/display_tbl.lib.php	Sun Jan  6 20:12:11 2002
+++ phpMyAdmin-2.2.3/libraries/display_tbl.lib.php	Mon Jan 21 12:41:18 2002
@@ -724,7 +724,7 @@
                 // loic1: pointer code part
                 $on_mouse = ($GLOBALS['cfgBrowsePointerColor'] == '')
                           ? ''
-                          : ' onmouseover="setPointer(this, \'' . $GLOBALS['cfgBrowsePointerColor'] . '\')" onmouseout="setPointer(this, \'' . $bgcolor . '\')"';
+                          : ' onmousedown="setPointer(this, \'' . $GLOBALS['cfgBrowsePointerColor'] . '\', \''.$bgcolor.'\')"';
 
                 ?>
 <tr<?php echo $on_mouse; ?>>
-------------- next part --------------
--- phpMyAdmin-2.2.3-orig/libraries/functions.js	Thu Jan  3 13:09:30 2002
+++ phpMyAdmin-2.2.3/libraries/functions.js	Mon Jan 21 12:39:02 2002
@@ -303,7 +303,7 @@
  *
  * @return  boolean  whether pointer is set or not
  */
-function setPointer(theRow, thePointerColor)
+function setPointer(theRow, thePointerColor, theNormalBgColor)
 {
     if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
         return false;
@@ -320,7 +320,11 @@
 
     var rowCellsCnt  = theCells.length;
     for (var c = 0; c < rowCellsCnt; c++) {
-        theCells[c].style.backgroundColor = thePointerColor;
+        if (theCells[c].style.backgroundColor.toLowerCase() == thePointerColor.toLowerCase()) {
+            theCells[c].style.backgroundColor = theNormalBgColor;
+        } else {
+            theCells[c].style.backgroundColor = thePointerColor;
+        }
     }
 
     return true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20020121/d0a6a067/attachment.sig>


More information about the Developers mailing list