Sticky position of table actions
This commit is contained in:
parent
996ebf61d7
commit
686865bc10
|
@ -120,6 +120,7 @@ if ($adminer->homepage()) {
|
||||||
|
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
if (!information_schema(DB)) {
|
if (!information_schema(DB)) {
|
||||||
|
echo "<div class='footer'>\n";
|
||||||
$vacuum = "<input type='submit' value='" . lang('Vacuum') . "'> " . on_help("'VACUUM'");
|
$vacuum = "<input type='submit' value='" . lang('Vacuum') . "'> " . on_help("'VACUUM'");
|
||||||
$optimize = "<input type='submit' name='optimize' value='" . lang('Optimize') . "'> " . on_help($jush == "sql" ? "'OPTIMIZE TABLE'" : "'VACUUM OPTIMIZE'");
|
$optimize = "<input type='submit' name='optimize' value='" . lang('Optimize') . "'> " . on_help($jush == "sql" ? "'OPTIMIZE TABLE'" : "'VACUUM OPTIMIZE'");
|
||||||
echo "<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>"
|
echo "<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>"
|
||||||
|
@ -144,6 +145,7 @@ if ($adminer->homepage()) {
|
||||||
echo script("qsl('input').onclick = function () { selectCount('selected', formChecked(this, /^(tables|views)\[/));" . (support("table") ? " selectCount('selected2', formChecked(this, /^tables\[/) || $tables);" : "") . " }");
|
echo script("qsl('input').onclick = function () { selectCount('selected', formChecked(this, /^(tables|views)\[/));" . (support("table") ? " selectCount('selected2', formChecked(this, /^tables\[/) || $tables);" : "") . " }");
|
||||||
echo "<input type='hidden' name='token' value='$token'>\n";
|
echo "<input type='hidden' name='token' value='$token'>\n";
|
||||||
echo "</div></fieldset>\n";
|
echo "</div></fieldset>\n";
|
||||||
|
echo "</div>\n";
|
||||||
}
|
}
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
echo script("tableCheck();");
|
echo script("tableCheck();");
|
||||||
|
|
|
@ -56,10 +56,12 @@ function connect_error() {
|
||||||
|
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo (support("database")
|
echo (support("database")
|
||||||
? "<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>\n"
|
? "<div class='footer'>\n"
|
||||||
|
. "<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>\n"
|
||||||
. "<input type='hidden' name='all' value=''>" . script("qsl('input').onclick = function () { selectCount('selected', formChecked(this, /^db/)); };") // used by trCheck()
|
. "<input type='hidden' name='all' value=''>" . script("qsl('input').onclick = function () { selectCount('selected', formChecked(this, /^db/)); };") // used by trCheck()
|
||||||
. "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm() . "\n"
|
. "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm() . "\n"
|
||||||
. "</div></fieldset>\n"
|
. "</div></fieldset>\n"
|
||||||
|
. "</div>\n"
|
||||||
: ""
|
: ""
|
||||||
);
|
);
|
||||||
echo "<input type='hidden' name='token' value='$token'>\n";
|
echo "<input type='hidden' name='token' value='$token'>\n";
|
||||||
|
|
|
@ -461,7 +461,9 @@ if (!$columns && support("table")) {
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "<div class='footer'>\n";
|
||||||
if (($rows || $page) && !is_ajax()) {
|
if (($rows || $page) && !is_ajax()) {
|
||||||
|
echo "<p>\n";
|
||||||
$exact_count = true;
|
$exact_count = true;
|
||||||
if ($_GET["page"] != "last") {
|
if ($_GET["page"] != "last") {
|
||||||
if ($limit == "" || (count($rows) < $limit && ($rows || !$page))) {
|
if ($limit == "" || (count($rows) < $limit && ($rows || !$page))) {
|
||||||
|
@ -478,7 +480,6 @@ if (!$columns && support("table")) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($limit != "" && ($found_rows === false || $found_rows > $limit || $page)) {
|
if ($limit != "" && ($found_rows === false || $found_rows > $limit || $page)) {
|
||||||
echo "<p class='pages'>";
|
|
||||||
// display first, previous 4, next 4 and last page
|
// display first, previous 4, next 4 and last page
|
||||||
$max_page = ($found_rows === false
|
$max_page = ($found_rows === false
|
||||||
? $page + (count($rows) >= $limit ? 2 : 1)
|
? $page + (count($rows) >= $limit ? 2 : 1)
|
||||||
|
@ -509,9 +510,9 @@ if (!$columns && support("table")) {
|
||||||
echo ($page ? pagination($page, $page) : "");
|
echo ($page ? pagination($page, $page) : "");
|
||||||
echo ($max_page > $page ? pagination($page + 1, $page) . ($max_page > $page + 1 ? " ..." : "") : "");
|
echo ($max_page > $page ? pagination($page + 1, $page) . ($max_page > $page + 1 ? " ..." : "") : "");
|
||||||
}
|
}
|
||||||
|
echo "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<p class='count'>\n";
|
|
||||||
echo ($found_rows !== false ? "(" . ($exact_count ? "" : "~ ") . lang('%d row(s)', $found_rows) . ") " : "");
|
echo ($found_rows !== false ? "(" . ($exact_count ? "" : "~ ") . lang('%d row(s)', $found_rows) . ") " : "");
|
||||||
$display_rows = ($exact_count ? "" : "~ ") . $found_rows;
|
$display_rows = ($exact_count ? "" : "~ ") . $found_rows;
|
||||||
echo checkbox("all", 1, 0, lang('whole result'), "var checked = formChecked(this, /check/); selectCount('selected', this.checked ? '$display_rows' : checked); selectCount('selected2', this.checked || !checked ? '$display_rows' : checked);") . "\n";
|
echo checkbox("all", 1, 0, lang('whole result'), "var checked = formChecked(this, /check/); selectCount('selected', this.checked ? '$display_rows' : checked); selectCount('selected2', this.checked || !checked ? '$display_rows' : checked);") . "\n";
|
||||||
|
@ -556,8 +557,9 @@ if (!$columns && support("table")) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$adminer->selectEmailPrint(array_filter($email_fields, 'strlen'), $columns);
|
$adminer->selectEmailPrint(array_filter($email_fields, 'strlen'), $columns);
|
||||||
|
echo "<input type='hidden' name='token' value='$token'>\n";
|
||||||
|
echo "</div>\n";
|
||||||
|
|
||||||
echo "<p><input type='hidden' name='token' value='$token'></p>\n";
|
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
echo (!$group && $select ? "" : script("tableCheck();"));
|
echo (!$group && $select ? "" : script("tableCheck();"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ table { margin: 1em 20px 0 0; border-collapse: collapse; font-size: 90%; }
|
||||||
td, th { border: 1px solid #999; padding: .2em .3em; }
|
td, th { border: 1px solid #999; padding: .2em .3em; }
|
||||||
th { background: #eee; text-align: left; }
|
th { background: #eee; text-align: left; }
|
||||||
thead th { text-align: center; padding: .2em .5em; }
|
thead th { text-align: center; padding: .2em .5em; }
|
||||||
thead td, thead th { background: #ddf; }
|
thead td, thead th { background: #ddf; } /* position: sticky; causes Firefox to lose borders */
|
||||||
fieldset { display: inline; vertical-align: top; padding: .5em .8em; margin: .8em .5em 0 0; border: 1px solid #999; }
|
fieldset { display: inline; vertical-align: top; padding: .5em .8em; margin: .8em .5em 0 0; border: 1px solid #999; }
|
||||||
p { margin: .8em 20px 0 0; }
|
p { margin: .8em 20px 0 0; }
|
||||||
img { vertical-align: middle; border: 0; }
|
img { vertical-align: middle; border: 0; }
|
||||||
|
@ -58,7 +58,7 @@ input.wayoff { left: -1000px; position: absolute; }
|
||||||
.icon:hover { background-color: red; }
|
.icon:hover { background-color: red; }
|
||||||
.size { width: 6ex; }
|
.size { width: 6ex; }
|
||||||
.help { cursor: help; }
|
.help { cursor: help; }
|
||||||
.pages { position: fixed; bottom: 0; left: 21em; padding: 5px; background: #ddf; border: 1px solid #999; }
|
.footer { position: sticky; bottom: 0; background: #fff; padding: 1px 0 .5em; }
|
||||||
.links a { white-space: nowrap; margin-right: 20px; }
|
.links a { white-space: nowrap; margin-right: 20px; }
|
||||||
.logout { margin-top: .5em; position: absolute; top: 0; right: 0; }
|
.logout { margin-top: .5em; position: absolute; top: 0; right: 0; }
|
||||||
.loadmore { margin-left: 1ex; }
|
.loadmore { margin-left: 1ex; }
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
Adminer 4.6.1-dev:
|
Adminer 4.6.1-dev:
|
||||||
Speed up rendering of long tables (regression from 4.4.0)
|
Speed up rendering of long tables (regression from 4.4.0)
|
||||||
|
Sticky position of table actions
|
||||||
MySQL: Support non-utf8 charset in search in column
|
MySQL: Support non-utf8 charset in search in column
|
||||||
MySQL: Support geometry in MySQL 8 (bug #574)
|
MySQL: Support geometry in MySQL 8 (bug #574)
|
||||||
SQLite: Allow deleting PRIMARY KEY from tables with auto increment
|
SQLite: Allow deleting PRIMARY KEY from tables with auto increment
|
||||||
|
|
Loading…
Reference in a new issue