]> git.joonet.de Git - adminer.git/commitdiff
Sticky position of table actions
authorJakub Vrana <jakub@vrana.cz>
Wed, 7 Feb 2018 23:00:52 +0000 (00:00 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 7 Feb 2018 23:14:32 +0000 (00:14 +0100)
adminer/db.inc.php
adminer/include/connect.inc.php
adminer/select.inc.php
adminer/static/default.css
changes.txt

index d606bf03397ae6e94154502e8a2e98225a1e2c1d..f76164c144d7f70257e78572a1503cf7ce31cd63 100644 (file)
@@ -120,6 +120,7 @@ if ($adminer->homepage()) {
 
                        echo "</table>\n";
                        if (!information_schema(DB)) {
+                               echo "<div class='footer'>\n";
                                $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'");
                                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 "<input type='hidden' name='token' value='$token'>\n";
                                echo "</div></fieldset>\n";
+                               echo "</div>\n";
                        }
                        echo "</form>\n";
                        echo script("tableCheck();");
index 31eb9bc777bd4c32b09945dadd78f95a2d5a071c..19af7e0053c82bd04cfa7b56b1303b88500b88ef 100644 (file)
@@ -56,10 +56,12 @@ function connect_error() {
                        
                        echo "</table>\n";
                        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='submit' name='drop' value='" . lang('Drop') . "'>" . confirm() . "\n"
                                        . "</div></fieldset>\n"
+                                       . "</div>\n"
                                : ""
                        );
                        echo "<input type='hidden' name='token' value='$token'>\n";
index ec36873c4c8d82da1f35ea7beeafaa3b94a42219..761b1d93f5082843bb947e3e4406ca31c7728861 100644 (file)
@@ -461,7 +461,9 @@ if (!$columns && support("table")) {
                        echo "</table>\n";
                }
 
+               echo "<div class='footer'>\n";
                if (($rows || $page) && !is_ajax()) {
+                       echo "<p>\n";
                        $exact_count = true;
                        if ($_GET["page"] != "last") {
                                if ($limit == "" || (count($rows) < $limit && ($rows || !$page))) {
@@ -478,7 +480,6 @@ if (!$columns && support("table")) {
                        }
 
                        if ($limit != "" && ($found_rows === false || $found_rows > $limit || $page)) {
-                               echo "<p class='pages'>";
                                // display first, previous 4, next 4 and last page
                                $max_page = ($found_rows === false
                                        ? $page + (count($rows) >= $limit ? 2 : 1)
@@ -509,9 +510,9 @@ if (!$columns && support("table")) {
                                        echo ($page ? pagination($page, $page) : "");
                                        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) . ") " : "");
                        $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";
@@ -556,8 +557,9 @@ if (!$columns && support("table")) {
                }
 
                $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 (!$group && $select ? "" : script("tableCheck();"));
        }
index 41835061e78dacc001407035d507d129fe423f44..1fdf5698573c7020680cbe8ba991ef7a3f5e113b 100644 (file)
@@ -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; }
 th { background: #eee; text-align: left; }
 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; }
 p { margin: .8em 20px 0 0; }
 img { vertical-align: middle; border: 0; }
@@ -58,7 +58,7 @@ input.wayoff { left: -1000px; position: absolute; }
 .icon:hover { background-color: red; }
 .size { width: 6ex; }
 .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; }
 .logout { margin-top: .5em; position: absolute; top: 0; right: 0; }
 .loadmore { margin-left: 1ex; }
index c0c5c797970d18e585c36cb35ba600d980049960..85ab585d9fb378ee1c0ad3bdfc2ab359f05f9500 100644 (file)
@@ -1,5 +1,6 @@
 Adminer 4.6.1-dev:
 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 geometry in MySQL 8 (bug #574)
 SQLite: Allow deleting PRIMARY KEY from tables with auto increment