Use class="active" instead of <b>
This commit is contained in:
parent
c108c7a96f
commit
8ad4809bc0
|
@ -103,7 +103,7 @@ document.getElementById('username').focus();
|
||||||
$links["edit"] = lang('New item');
|
$links["edit"] = lang('New item');
|
||||||
}
|
}
|
||||||
foreach ($links as $key => $val) {
|
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";
|
echo "\n";
|
||||||
}
|
}
|
||||||
|
@ -717,9 +717,9 @@ DROP PROCEDURE adminer_alter;
|
||||||
<p class="logout">
|
<p class="logout">
|
||||||
<?php
|
<?php
|
||||||
if (DB == "" || !$missing) {
|
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")) {
|
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) {
|
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();
|
$tables = tables_list();
|
||||||
if (!$tables) {
|
if (!$tables) {
|
||||||
echo "<p class='message'>" . lang('No tables.') . "\n";
|
echo "<p class='message'>" . lang('No tables.') . "\n";
|
||||||
|
@ -775,8 +775,8 @@ DROP PROCEDURE adminer_alter;
|
||||||
function tablesPrint($tables) {
|
function tablesPrint($tables) {
|
||||||
echo "<p id='tables'>\n";
|
echo "<p id='tables'>\n";
|
||||||
foreach ($tables as $table => $type) {
|
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) . 'select=' . urlencode($table) . '"' . bold($_GET["select"] == $table) . ">" . lang('select') . "</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) . 'table=' . urlencode($table) . '"' . bold($_GET["table"] == $table) . ">" . $this->tableName(array("Name" => $table)) . "</a><br>\n"; //! Adminer::tableName may work with full table status
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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";
|
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
|
/** Return class='active' if $bold is true
|
||||||
* @param string
|
|
||||||
* @param bool
|
* @param bool
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function bold($string, $bold) {
|
function bold($bold) {
|
||||||
return ($bold ? "<b>$string</b>" : $string);
|
return ($bold ? " class='active'" : "");
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,7 @@ pre { margin: 1em 0 0; }
|
||||||
.number { text-align: right; }
|
.number { text-align: right; }
|
||||||
.datetime { text-align: right; }
|
.datetime { text-align: right; }
|
||||||
.type { width: 15ex; width: auto\9; }
|
.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 { 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; }
|
#menu p { padding: .8em 1em; margin: 0; border-bottom: 1px solid #ccc; }
|
||||||
#content { margin: 2em 0 0 21em; padding: 10px 20px 20px 0; }
|
#content { margin: 2em 0 0 21em; padding: 10px 20px 20px 0; }
|
||||||
|
|
|
@ -510,7 +510,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
|
||||||
foreach ($tables as $row) {
|
foreach ($tables as $row) {
|
||||||
$name = $this->tableName($row);
|
$name = $this->tableName($row);
|
||||||
if (isset($row["Engine"]) && $name != "") { // ignore views and tables without name
|
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";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue