mirror of
https://github.com/vrana/adminer.git
synced 2025-08-06 14:46:36 +02:00
Anchor Logout button to body, not to viewport (bug #979)
This reverts commit e277d05162
.
This commit is contained in:
@@ -85,7 +85,7 @@ const thousandsSeparator = '" . js_escape(lang(',')) . "';")
|
||||
echo "<div id='help' class='jush-" . JUSH . " jsonly hidden'></div>\n";
|
||||
echo script("mixin(qs('#help'), {onmouseover: () => { helpOpen = 1; }, onmouseout: helpMouseout});");
|
||||
echo "<div id='content'>\n";
|
||||
echo "<span id='menuopen' class='jsonly'>" . icon("move", "", "menu", "") . "</span>" . script("qs('#menuopen').onclick = event => { qs('#menu').classList.toggle('foot'); event.stopPropagation(); }");
|
||||
echo "<span id='menuopen' class='jsonly'>" . icon("move", "", "menu", "") . "</span>" . script("qs('#menuopen').onclick = event => { qs('#foot').classList.toggle('foot'); event.stopPropagation(); }");
|
||||
if ($breadcrumb !== null) {
|
||||
$link = substr(preg_replace('~\b(username|db|ns)=[^&]*&~', '', ME), 0, -1);
|
||||
echo '<p id="breadcrumb"><a href="' . h($link ?: ".") . '">' . get_driver(DRIVER) . '</a> » ';
|
||||
@@ -190,16 +190,16 @@ function page_messages(string $error): void {
|
||||
* @param ''|'auth'|'db'|'ns' $missing
|
||||
*/
|
||||
function page_footer(string $missing = ""): void {
|
||||
echo "</div>\n\n<div id='menu' class='foot'>\n";
|
||||
echo "</div>\n\n<div id='foot' class='foot'>\n<div id='menu'>\n";
|
||||
adminer()->navigation($missing);
|
||||
echo "</div>\n";
|
||||
if ($missing != "auth") {
|
||||
?>
|
||||
<form action="" method="post">
|
||||
<div class="logout">
|
||||
<p class="logout">
|
||||
<span><?php echo h($_GET["username"]) . "\n"; ?></span>
|
||||
<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>" id="logout">
|
||||
<?php echo input_token(); ?>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
@@ -75,7 +75,7 @@ input.wayoff { left: -1000px; position: absolute; }
|
||||
.footer > div { background: var(--bg); padding: 0 0 .5em; }
|
||||
.footer fieldset { margin-top: 0; }
|
||||
.links a { white-space: nowrap; margin-right: 20px; }
|
||||
.logout { position: fixed; top: .5em; right: 20px; }
|
||||
.logout { margin-top: .5em; position: absolute; top: 0; right: 0; }
|
||||
.loadmore { margin-left: 1ex; }
|
||||
/* .edit used in designs */
|
||||
#menu { position: absolute; margin: 10px 0 0; top: 2em; left: 0; width: 19em; }
|
||||
@@ -116,15 +116,15 @@ input.wayoff { left: -1000px; position: absolute; }
|
||||
|
||||
@media all and (max-width: 880px) {
|
||||
.pages { left: auto; }
|
||||
.logout { position: absolute; top: 1.667em; }
|
||||
#menu { width: auto; background: var(--bg); border: 1px solid var(--fg); margin-top: 9px; box-shadow: 0 0 20px rgb(from var(--fg) r g b / .7); }
|
||||
.js .logout { top: 1.667em; }
|
||||
#menu { position: static; width: auto; min-width: 23em; background: var(--bg); border: 1px solid var(--fg); margin-top: 9px; box-shadow: 0 0 20px rgb(from var(--fg) r g b / .7); }
|
||||
#content { margin-left: 10px; }
|
||||
#lang { position: static; }
|
||||
#breadcrumb { left: 48px; }
|
||||
.js #foot { position: absolute; top: 2em; left: 0; }
|
||||
.js .foot { display: none; }
|
||||
.js #menuopen { display: block; position: absolute; top: 3px; left: 6px; }
|
||||
.nojs #menu { position: static; }
|
||||
.nojs .logout { position: static; padding: 1em; }
|
||||
.rtl .pages { right: auto; }
|
||||
.rtl #content { margin-right: 10px; }
|
||||
.rtl #breadcrumb { right: auto; }
|
||||
|
@@ -848,7 +848,7 @@ oninput = event => {
|
||||
};
|
||||
|
||||
addEvent(document, 'click', event => {
|
||||
if (!qs('#menu').contains(event.target)) {
|
||||
alterClass(qs('#menu'), 'foot', true);
|
||||
if (!qs('#foot').contains(event.target)) {
|
||||
alterClass(qs('#foot'), 'foot', true);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user