diff --git a/adminer/select.inc.php b/adminer/select.inc.php index f359cdbc..c8dc5ec7 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -437,7 +437,6 @@ if (!$columns) { exit; } echo "\n"; - echo (!$group && $select ? "" : "\n"); } if (($rows || $page) && !is_ajax()) { @@ -480,20 +479,21 @@ if (!$columns) { echo "

\n"; echo ($found_rows !== false ? "(" . ($exact_count ? "" : "~ ") . lang('%d row(s)', $found_rows) . ") " : ""); - echo checkbox("all", 1, 0, lang('whole result')) . "\n"; + echo checkbox("all", 1, 0, lang('whole result'), "selectCount(this.checked ? '$found_rows' : formChecked(this, /check/));") . "\n"; if ($adminer->selectCommandPrint()) { ?> >

>
-
+
tableCheck();\n"); $format = $adminer->dumpFormat(); foreach ((array) $_GET["columns"] as $column) { diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 13d5485a..82fb7af3 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -57,6 +57,16 @@ function parentTag(el, tag) { function trCheck(el) { var tr = parentTag(el, 'tr'); tr.className = tr.className.replace(/(^|\s)checked(\s|$)/, '$2') + (el.checked ? ' checked' : ''); + if (el.form['all']) { + el.form['all'].onclick(); + } +} + +/** Fill number of selected items +* @param string +*/ +function selectCount(count) { + setHtml('selected', (count === '' ? '' : '(' + count + ')')); } /** Check all elements matching given name diff --git a/changes.txt b/changes.txt index ca1c3d56..1f2433bd 100644 --- a/changes.txt +++ b/changes.txt @@ -4,6 +4,7 @@ Add a new column in alter table on key press Mark length as required for strings Add label to database selection Add button for dropping an index +Display number of selected rows PostgreSQL: Fix handling of nextval() default values Adminer 3.7.1 (released 2013-06-29):