echo (support("copy") ? " <input type='submit' name='copy' value='" . lang('Copy') . "'>" : "");
echo "\n";
}
- echo "<input type='hidden' name='all' value='' onclick='selectCount(formChecked(this, /^(tables|views)\[/));'>\n"; // used by trCheck()
+ echo "<input type='hidden' name='all' value='' onclick=\"selectCount('selected', formChecked(this, /^(tables|views)\[/));\">\n"; // used by trCheck()
echo "<input type='hidden' name='token' value='$token'>\n";
echo "</div></fieldset>\n";
}
echo "<p>\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()) {
?>
</div></fieldset>
<?php
}
- echo (!$group && $select ? "" : "<script type='text/javascript'>tableCheck();</script>\n");
$format = $adminer->dumpFormat();
foreach ((array) $_GET["columns"] as $column) {
}
}
if ($format) {
- print_fieldset("export", lang('Export'));
+ print_fieldset("export", lang('Export') . " <span id='selected2'></span>");
$output = $adminer->dumpOutput();
echo ($output ? html_select("output", $output, $adminer_import["output"]) . " " : "");
echo html_select("format", $format, $adminer_import["format"]);
echo " <input type='submit' name='export' value='" . lang('Export') . "'>\n";
echo "</div></fieldset>\n";
}
+
+ echo (!$group && $select ? "" : "<script type='text/javascript'>tableCheck();</script>\n");
}
if ($adminer->selectImportPrint()) {
/** 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