Tick all box on Select feature
authorchriskl <chriskl>
Tue, 19 Aug 2003 04:04:11 +0000 (04:04 +0000)
committerchriskl <chriskl>
Tue, 19 Aug 2003 04:04:11 +0000 (04:04 +0000)
HISTORY
tables.php

diff --git a/HISTORY b/HISTORY
index 335b3b4bb6e36291000f6a13baf0e1f9e390371f..244db94964d146f74370ee657c4d1896274e988b 100644 (file)
--- a/HISTORY
+++ b/HISTORY
@@ -30,6 +30,7 @@ Features:
 * Changed XML format significantly.  Now doesn't use field names as
   tag names, outputs column type information, and is in correct XML format!
 * 'Save as Report' feature when viewing record sets
+* Tick all box on Select feature
 
 Bug Fixes:
 * Lots of NULL value in table dump fixes (XML format changed slightly)
index 8ced37bd99b24a9ddaadcd7eeca3a9c32a0ac753..20a54060da9e80cd2d86f556a0845e355dbf318a 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List tables in a database
         *
-        * $Id: tables.php,v 1.31 2003/08/13 09:21:41 chriskl Exp $
+        * $Id: tables.php,v 1.32 2003/08/19 04:04:12 chriskl Exp $
         */
 
        // Include application functions
 
                        $attrs = &$localData->getTableAttributes($_REQUEST['table']);
 
-                       echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
+                       echo "<form action=\"$PHP_SELF\" method=\"post\" name=\"selectform\">\n";
                        if ($attrs->recordCount() > 0) {
+                               // JavaScript for select all feature
+                               echo "<script language=\"JavaScript\">\n";
+                               echo "<!--\n";
+                               echo "  function selectAll() {\n";
+                               echo "          for (var i=0; i<document.selectform.elements.length; i++) {\n";
+                               echo "                  var e = document.selectform.elements[i];\n";
+                               echo "                  if (e.name.indexOf('show') == 0) e.checked = document.selectform.selectall.checked;\n";
+                               echo "          }\n";
+                               echo "  }\n";
+                               echo "//-->\n";
+                               echo "</script>\n";
+       
                                echo "<table>\n<tr>";
 
                                // Output table header
                                        $i++;
                                        $attrs->moveNext();
                                }
+                               // Select all checkbox
+                               echo "<tr><td><input type=\"checkbox\" name=\"selectall\" onClick=\"javascript:selectAll()\" /></td>";
+                               echo "<td colspan=\"4\"></td></tr>\n";
                                echo "</table></p>\n";
                        }
                        else echo "<p>{$lang['strinvalidparam']}</p>\n";