From 491cdefc84c4dd6560baa9a7f3c25d839f0b6c84 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Wed, 10 Jul 2013 10:12:58 -0700 Subject: [PATCH] Display number of rows to export --- adminer/db.inc.php | 2 +- adminer/select.inc.php | 7 ++++--- adminer/static/functions.js | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/adminer/db.inc.php b/adminer/db.inc.php index 4ba8ef80..8ecec802 100644 --- a/adminer/db.inc.php +++ b/adminer/db.inc.php @@ -122,7 +122,7 @@ if ($adminer->homepage()) { echo (support("copy") ? " " : ""); echo "\n"; } - echo "\n"; // used by trCheck() + echo "\n"; // used by trCheck() echo "\n"; echo "\n"; } diff --git a/adminer/select.inc.php b/adminer/select.inc.php index adcef739..2f467b7a 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -493,7 +493,7 @@ if (!$columns && support("table")) { echo "

\n"; echo ($found_rows !== false ? "(" . ($exact_count ? "" : "~ ") . lang('%d row(s)', $found_rows) . ") " : ""); - echo checkbox("all", 1, 0, lang('whole result'), "selectCount(this.checked ? '$found_rows' : formChecked(this, /check/));") . "\n"; + echo checkbox("all", 1, 0, lang('whole result'), "var checked = formChecked(this, /check/); selectCount('selected', this.checked ? '$found_rows' : checked); selectCount('selected2', this.checked || !checked ? '$found_rows' : checked);") . "\n"; if ($adminer->selectCommandPrint()) { ?> @@ -507,7 +507,6 @@ if (!$columns && support("table")) { tableCheck();\n"); $format = $adminer->dumpFormat(); foreach ((array) $_GET["columns"] as $column) { @@ -517,13 +516,15 @@ if (!$columns && support("table")) { } } if ($format) { - print_fieldset("export", lang('Export')); + print_fieldset("export", lang('Export') . " "); $output = $adminer->dumpOutput(); echo ($output ? html_select("output", $output, $adminer_import["output"]) . " " : ""); echo html_select("format", $format, $adminer_import["format"]); echo " \n"; echo "\n"; } + + echo (!$group && $select ? "" : "\n"); } if ($adminer->selectImportPrint()) { diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 138305bf..77a122a6 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -67,9 +67,10 @@ function trCheck(el) { /** Fill number of selected items * @param string +* @param string */ -function selectCount(count) { - setHtml('selected', (count === '' ? '' : '(' + count + ')')); +function selectCount(id, count) { + setHtml(id, (count === '' ? '' : '(' + count + ')')); } /** Check all elements matching given name