]> git.joonet.de Git - adminer.git/commitdiff
Use class="active" instead of <b>
authorJakub Vrana <jakub@vrana.cz>
Mon, 22 Nov 2010 15:08:36 +0000 (16:08 +0100)
committerJakub Vrana <jakub@vrana.cz>
Mon, 22 Nov 2010 17:00:53 +0000 (18:00 +0100)
adminer/include/adminer.inc.php
adminer/include/functions.inc.php
adminer/static/default.css
editor/include/adminer.inc.php

index 420d2fafb6d924e1cc76d0e1ccfa6794909c6076..ce8ec73a9c0317e6711e06aba390647351f87329 100644 (file)
@@ -103,7 +103,7 @@ document.getElementById('username').focus();
                        $links["edit"] = lang('New item');
                }
                foreach ($links as $key => $val) {
-                       echo " <a href='" . h(ME) . "$key=" . urlencode($tableStatus["Name"]) . ($key == "edit" ? $set : "") . "'>" . bold($val, isset($_GET[$key])) . "</a>";
+                       echo " <a href='" . h(ME) . "$key=" . urlencode($tableStatus["Name"]) . ($key == "edit" ? $set : "") . "'" . bold(isset($_GET[$key])) . ">$val</a>";
                }
                echo "\n";
        }
@@ -717,9 +717,9 @@ DROP PROCEDURE adminer_alter;
 <p class="logout">
 <?php
                        if (DB == "" || !$missing) {
-                               echo "<a href='" . h(ME) . "sql='>" . bold(lang('SQL command'), isset($_GET["sql"])) . "</a>\n";
+                               echo "<a href='" . h(ME) . "sql='" . bold(isset($_GET["sql"])) . ">" . lang('SQL command') . "</a>\n";
                                if (support("dump")) {
-                                       echo "<a href='" . h(ME) . "dump=" . urlencode(isset($_GET["table"]) ? $_GET["table"] : $_GET["select"]) . "'>" . bold(lang('Dump'), isset($_GET["dump"])) . "</a>\n";
+                                       echo "<a href='" . h(ME) . "dump=" . urlencode(isset($_GET["table"]) ? $_GET["table"] : $_GET["select"]) . "'" . bold(isset($_GET["dump"])) . ">" . lang('Dump') . "</a>\n";
                                }
                        }
                        ?>
@@ -741,7 +741,7 @@ DROP PROCEDURE adminer_alter;
                                        }
                                }
                                if ($_GET["ns"] !== "" && !$missing) {
-                                       echo '<p><a href="' . h(ME) . 'create=">' . bold(lang('Create new table'), $_GET["create"] === "") . "</a>\n";
+                                       echo '<p><a href="' . h(ME) . 'create="' . bold($_GET["create"] === "") . ">" . lang('Create new table') . "</a>\n";
                                        $tables = tables_list();
                                        if (!$tables) {
                                                echo "<p class='message'>" . lang('No tables.') . "\n";
@@ -775,8 +775,8 @@ DROP PROCEDURE adminer_alter;
        function tablesPrint($tables) {
                echo "<p id='tables'>\n";
                foreach ($tables as $table => $type) {
-                       echo '<a href="' . h(ME) . 'select=' . urlencode($table) . '">' . bold(lang('select'), $_GET["select"] == $table) . '</a> ';
-                       echo '<a href="' . h(ME) . 'table=' . urlencode($table) . '">' . bold($this->tableName(array("Name" => $table)), $_GET["table"] == $table) . "</a><br>\n"; //! Adminer::tableName may work with full table status
+                       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) . ">" . $this->tableName(array("Name" => $table)) . "</a><br>\n"; //! Adminer::tableName may work with full table status
                }
        }
        
index 6cb0a41d747825be18eb3e20022f051696f92c9e..fff0a69f175f7dff13a3c577bd7586294356edd2 100644 (file)
@@ -807,11 +807,10 @@ function print_fieldset($id, $legend, $visible = false) {
        echo "<fieldset><legend><a href='#fieldset-$id' onclick=\"return !toggle('fieldset-$id');\">$legend</a></legend><div id='fieldset-$id'" . ($visible ? "" : " class='hidden'") . ">\n";
 }
 
-/** Enclose $string to <b> if $bold is true
-* @param string
+/** Return class='active' if $bold is true
 * @param bool
 * @return string
 */
-function bold($string, $bold) {
-       return ($bold ? "<b>$string</b>" : $string);
+function bold($bold) {
+       return ($bold ? " class='active'" : "");
 }
index 5badf8b462853d80b9bc3a80a7c89c6eb1adb3d0..d299fc8357d36a82e340f222d2202fbd23077e37 100644 (file)
@@ -36,6 +36,7 @@ pre { margin: 1em 0 0; }
 .number { text-align: right; }
 .datetime { text-align: right; }
 .type { width: 15ex; width: auto\9; }
+.active { font-weight: bold; }
 #menu { position: absolute; margin: 10px 0 0; padding: 0 0 30px 0; top: 2em; left: 0; width: 19em; overflow: auto; overflow-y: hidden; white-space: nowrap; }
 #menu p { padding: .8em 1em; margin: 0; border-bottom: 1px solid #ccc; }
 #content { margin: 2em 0 0 21em; padding: 10px 20px 20px 0; }
index f74aeea8d44c981482a3dca91d2df4bc868c92aa..85fc5a5b70aaae04707eeeeeaa80f118f6cfcf4f 100644 (file)
@@ -510,7 +510,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
                foreach ($tables as $row) {
                        $name = $this->tableName($row);
                        if (isset($row["Engine"]) && $name != "") { // ignore views and tables without name
-                               echo "<a href='" . h(ME) . 'select=' . urlencode($row["Name"]) . "'>" . bold($name, $_GET["select"] == $row["Name"]) . "</a><br>\n";
+                               echo "<a href='" . h(ME) . 'select=' . urlencode($row["Name"]) . "'" . bold($_GET["select"] == $row["Name"]) . ">$name</a><br>\n";
                        }
                }
        }