]> git.joonet.de Git - adminer.git/commitdiff
Autodisplay long logins in saved logins list
authorJakub Vrana <jakub@vrana.cz>
Wed, 8 Aug 2012 15:27:50 +0000 (08:27 -0700)
committerJakub Vrana <jakub@vrana.cz>
Wed, 8 Aug 2012 15:27:50 +0000 (08:27 -0700)
adminer/include/adminer.inc.php
adminer/static/default.css
adminer/static/functions.js
editor/include/adminer.inc.php

index eedee5cfd08bc79ab1a73409bc8c78bc84ca0837..e551f67374c45d22852fa59487cd39b2dfa5c3e4 100644 (file)
@@ -777,7 +777,7 @@ DROP PROCEDURE adminer_alter;
                                        foreach ($usernames as $username => $password) {
                                                if ($password !== null) {
                                                        if ($first) {
-                                                               echo "<p>\n";
+                                                               echo "<p id='logins' onmouseover='menuOver(this);' onmouseout='menuOut(this);'>\n";
                                                                $first = false;
                                                        }
                                                        echo "<a href='" . h(auth_url($driver, $server, $username)) . "'>($drivers[$driver]) " . h($username . ($server != "" ? "@$server" : "")) . "</a><br>\n";
@@ -803,7 +803,7 @@ DROP PROCEDURE adminer_alter;
 </p>
 </form>
 <form action="">
-<p style="overflow: hidden;">
+<p id="dbs">
 <?php hidden_fields_get(); ?>
 <?php echo ($databases ? html_select("db", array("" => "(" . lang('database') . ")") + $databases, DB, "this.form.submit();") : '<input name="db" value="' . h(DB) . '">'); ?>
 <input type="submit" value="<?php echo lang('Use'); ?>"<?php echo ($databases ? " class='hidden'" : ""); ?>>
@@ -848,7 +848,7 @@ DROP PROCEDURE adminer_alter;
        * @return null
        */
        function tablesPrint($tables) {
-               echo '<p id="tables" onmouseover="this.style.overflow = \'visible\';" onmouseout="this.style.overflow = \'auto\';">' . "\n";
+               echo '<p id="tables" onmouseover="menuOver(this);" onmouseout="menuOut(this);">' . "\n";
                foreach ($tables as $table => $type) {
                        echo '<a href="' . h(ME) . 'select=' . urlencode($table) . '"' . bold($_GET["select"] == $table) . ">" . lang('select') . "</a> ";
                        echo '<a href="' . h(ME) . 'table=' . urlencode($table) . '"' . bold($_GET["table"] == $table) . " title='" . lang('Show structure') . "'>" . $this->tableName(array("Name" => $table)) . "</a><br>\n"; //! Adminer::tableName may work with full table status
index 12837e5533017e398262a878bc44eaf4fccfedc2..39c0751fbc240d04b6b409fa95ae24ddca9516ad 100644 (file)
@@ -47,8 +47,9 @@ input[type=image] { vertical-align: middle; }
 .icon { width: 18px; height: 18px; }
 #menu { position: absolute; margin: 10px 0 0; padding: 0 0 30px 0; top: 2em; left: 0; width: 19em; white-space: nowrap; }
 #menu p { padding: .8em 1em; margin: 0; border-bottom: 1px solid #ccc; }
-#tables { overflow: auto; }
-#tables a { background: #fff; }
+#dbs { overflow: hidden; }
+#logins, #tables { overflow: auto; }
+#logins a, #tables a { background: #fff; }
 #content { margin: 2em 0 0 21em; padding: 10px 20px 20px 0; }
 #lang { position: absolute; top: 0; left: 0; line-height: 1.8em; padding: .3em 1em; }
 #breadcrumb { white-space: nowrap; position: absolute; top: 0; left: 21em; background: #eee; height: 2em; line-height: 1.8em; padding: 0 1em; margin: 0 0 0 -18px; }
index 8afa5d506c470f955da7a8c8f17cf71cd5c936a6..ee080d80a4d9929394bccb5a421904b9a044ca29 100644 (file)
@@ -195,6 +195,14 @@ function pageClick(href, page, event) {
        }
 }
 
+function menuOver(el) {
+       el.style.overflow = 'visible';
+}
+
+function menuOut(el) {
+       el.style.overflow = 'auto';
+}
+
 
 
 /** Add row in select fieldset
index c89151f5d212fcb6aa2787b71c0a51d0312256e5..8135452750833e27b019f90e506548fea12e9623 100644 (file)
@@ -532,7 +532,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
                        foreach ((array) $_SESSION["pwds"]["server"][""] as $username => $password) {
                                if ($password !== null) {
                                        if ($first) {
-                                               echo "<p>\n";
+                                               echo "<p id='logins' onmouseover='menuOver(this);' onmouseout='menuOut(this);'>\n";
                                                $first = false;
                                        }
                                        echo "<a href='" . h(auth_url("server", "", $username)) . "'>" . ($username != "" ? h($username) : "<i>" . lang('empty') . "</i>") . "</a><br>\n";
@@ -559,7 +559,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
        }
        
        function tablesPrint($tables) {
-               echo '<p id="tables" onmouseover="this.style.overflow = \'visible\';" onmouseout="this.style.overflow = \'auto\';">' . "\n";
+               echo '<p id="tables" onmouseover="menuOver(this);" onmouseout="menuOut(this);">' . "\n";
                foreach ($tables as $row) {
                        $name = $this->tableName($row);
                        if (isset($row["Engine"]) && $name != "") { // ignore views and tables without name