Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use class="active" instead of <b>

  • Loading branch information...
commit 8ad4809bc01799401f31fd867e56d7ccf073acdc 1 parent c108c7a
@vrana authored
View
12 adminer/include/adminer.inc.php
@@ -103,7 +103,7 @@ function selectLinks($tableStatus, $set = "") {
$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 @@ function navigation($missing) {
<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 @@ function navigation($missing) {
}
}
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 @@ function navigation($missing) {
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
}
}
View
7 adminer/include/functions.inc.php
@@ -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'" : "");
}
View
1  adminer/static/default.css
@@ -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; }
View
2  editor/include/adminer.inc.php
@@ -510,7 +510,7 @@ function tablesPrint($tables) {
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";
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.