Simplify JavaScript
This commit is contained in:
parent
0997455fb6
commit
fbc668cfe3
|
@ -736,14 +736,14 @@ DROP PROCEDURE adminer_alter;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||||
<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>">
|
<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>" onclick="eventStop(event);">
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
<form action="">
|
<form action="">
|
||||||
<p>
|
<p>
|
||||||
<?php hidden_fields_get(); ?>
|
<?php hidden_fields_get(); ?>
|
||||||
<?php echo ($databases ? html_select("db", array("" => "(" . lang('database') . ")") + $databases, DB, "this.form.submit();") : '<input name="db" value="' . h(DB) . '">'); ?>
|
<?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'" : ""); ?> onclick="this.form.submit(); return false;">
|
<input type="submit" value="<?php echo lang('Use'); ?>"<?php echo ($databases ? " class='hidden'" : ""); ?> onclick="eventStop(event);">
|
||||||
<?php
|
<?php
|
||||||
if ($missing != "db" && DB != "" && $connection->select_db(DB)) {
|
if ($missing != "db" && DB != "" && $connection->select_db(DB)) {
|
||||||
if (support("scheme")) {
|
if (support("scheme")) {
|
||||||
|
|
|
@ -430,7 +430,7 @@ function bodyClick(event, db, ns) {
|
||||||
var match2 = /&ns=([^&]*)/.exec(el.href);
|
var match2 = /&ns=([^&]*)/.exec(el.href);
|
||||||
return !(db == (match ? match[1] : '') && ns == (match2 ? match2[1] : '') && ajaxMain(el.href, '', event));
|
return !(db == (match ? match[1] : '') && ns == (match2 ? match2[1] : '') && ajaxMain(el.href, '', event));
|
||||||
}
|
}
|
||||||
if (/^input$/i.test(el.tagName) && (el.type == 'image' || (el.type == 'submit' && el.name != 'logout' && !/&(database|scheme|create|view|sql|user|dump)=/.test(location.href)))) {
|
if (/^input$/i.test(el.tagName) && (el.type == 'image' || (el.type == 'submit' && !/&(database|scheme|create|view|sql|user|dump)=/.test(location.href)))) {
|
||||||
return !ajaxForm(el.form, (el.name ? encodeURIComponent(el.name) + (el.type == 'image' ? '.x' : '') + '=1' : ''));
|
return !ajaxForm(el.form, (el.name ? encodeURIComponent(el.name) + (el.type == 'image' ? '.x' : '') + '=1' : ''));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -501,7 +501,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
<p class="logout">
|
<p class="logout">
|
||||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||||
<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>">
|
<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>" onclick="eventStop(event);">
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Reference in a new issue