diff --git a/adminer/db.inc.php b/adminer/db.inc.php index f76164c1..d2215629 100644 --- a/adminer/db.inc.php +++ b/adminer/db.inc.php @@ -85,7 +85,7 @@ if ($adminer->homepage()) { foreach ($tables_list as $name => $type) { $view = ($type !== null && !preg_match('~table~i', $type)); $id = h("Table-" . $name); - echo '' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array($name, $tables_views, true), "", "formUncheck('check-all');", "", $id); + echo '' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array($name, $tables_views, true), "", "", "", $id); echo '' . (support("table") || support("indexes") ? "" . h($name) . '' : h($name)); if ($view) { echo '' . (preg_match('~materialized~i', $type) ? lang('Materialized view') : lang('View')) . ''; diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 30c04c73..907b37f2 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -277,6 +277,9 @@ function tableClick(event, click) { el.form['all'].checked = false; formUncheck('all-page'); } + if (/^(tables|views)\[\]$/.test(el.name)) { + formUncheck('check-all'); + } trCheck(el); } diff --git a/editor/db.inc.php b/editor/db.inc.php index 5c13f6e6..6cc38b20 100644 --- a/editor/db.inc.php +++ b/editor/db.inc.php @@ -18,7 +18,7 @@ if ($adminer->homepage()) { foreach (table_status() as $table => $row) { $name = $adminer->tableName($row); if (isset($row["Engine"]) && $name != "") { - echo '' . checkbox("tables[]", $table, in_array($table, (array) $_POST["tables"], true), "", "formUncheck('check-all');"); + echo '' . checkbox("tables[]", $table, in_array($table, (array) $_POST["tables"], true)); echo "$name"; $val = format_number($row["Rows"]); echo "" . ($row["Engine"] == "InnoDB" && $val ? "~ $val" : $val) . "";