]> git.joonet.de Git - adminer.git/commitdiff
Separate page and whole result check
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Sun, 7 Jun 2009 23:20:00 +0000 (23:20 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Sun, 7 Jun 2009 23:20:00 +0000 (23:20 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@659 7c3ca157-0c34-0410-bff1-cbf682f78f5c

select.inc.php

index 3fbdb44a95611d5b9c698ef97e125604ae9dec06..4da734a7a079ced6a462040e498d3accaf357cad 100644 (file)
@@ -226,7 +226,7 @@ if (!$columns) {
                        echo "<table cellspacing='0' class='nowrap'>\n";
                        for ($j=0; $row = $result->fetch_assoc(); $j++) {
                                if (!$j) {
-                                       echo '<thead><tr><td><label><input type="checkbox" name="all" value="1" />' . lang('whole result') . '</label></td>';
+                                       echo '<thead><tr><td><input type="checkbox" id="all-page" onclick="form_check(this, /check/);" /></td>';
                                        foreach ($row as $key => $val) {
                                                $pos = array_search($key, (array) $_GET["order"]);
                                                $uri = remove_from_uri($pos !== false ? "(order|desc)%5B$pos%5D" : "");
@@ -243,7 +243,7 @@ if (!$columns) {
                                        echo "</tr></thead>\n";
                                }
                                $unique_idf = implode('&amp;', unique_idf($row, $indexes));
-                               echo '<tr' . odd() . '><td><input type="checkbox" name="check[]" value="' . $unique_idf . '" onclick="this.form[\'all\'].checked = false;" />' . (count($select) == count($group) && $_GET["db"] != "information_schema" ? ' <a href="' . htmlspecialchars($SELF) . 'edit=' . urlencode($_GET['select']) . '&amp;' . $unique_idf . '">' . lang('edit') . '</a> <a href="' . htmlspecialchars($SELF) . 'clone=' . urlencode($_GET['select']) . '&amp;' . $unique_idf . '">' . lang('clone') . '</a></td>' : '');
+                               echo '<tr' . odd() . '><td><input type="checkbox" name="check[]" value="' . $unique_idf . '" onclick="this.form[\'all\'].checked = false; form_uncheck(\'all-page\');" />' . (count($select) == count($group) && $_GET["db"] != "information_schema" ? ' <a href="' . htmlspecialchars($SELF) . 'edit=' . urlencode($_GET['select']) . '&amp;' . $unique_idf . '">' . lang('edit') . '</a> <a href="' . htmlspecialchars($SELF) . 'clone=' . urlencode($_GET['select']) . '&amp;' . $unique_idf . '">' . lang('clone') . '</a></td>' : '');
                                foreach ($row as $key => $val) {
                                        if (!isset($val)) {
                                                $val = "<i>NULL</i>";
@@ -292,7 +292,7 @@ if (!$columns) {
                                }
                                print_page($max_page);
                        }
-                       echo " (" . lang('%d row(s)', $found_rows) . ")</p>\n";
+                       echo " (" . lang('%d row(s)', $found_rows) . ') <label><input type="checkbox" name="all" value="1" />' . lang('whole result') . "</label></p>\n";
                        
                        echo ($_GET["db"] != "information_schema" ? "<fieldset><legend>" . lang('Edit') . "</legend><div><input type='submit' value='" . lang('Edit') . "' /> <input type='submit' name='clone' value='" . lang('Clone') . "' /> <input type='submit' name='delete' value='" . lang('Delete') . "'$confirm /></div></fieldset>\n" : "");
                        echo "<fieldset><legend>" . lang('Export') . "</legend><div>$dump_output $dump_format <input type='submit' name='export' value='" . lang('Export') . "' /></div></fieldset>\n";