Disable AJAX for schema change
This commit is contained in:
parent
a4982c90e0
commit
06a916102d
|
@ -32,7 +32,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
|
|||
<link rel="stylesheet" type="text/css" href="adminer.css">
|
||||
<?php } ?>
|
||||
|
||||
<body class="<?php echo lang('ltr'); ?>"<?php if (isset($_GET["username"])) { ?> onclick="return bodyClick(event, '<?php echo js_escape(DB); ?>');"<?php } ?> onload="bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info, 0, 3) : ""); ?>', '<?php echo $protocol; ?>');<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verifyVersion('$protocol');"); ?>">
|
||||
<body class="<?php echo lang('ltr'); ?>"<?php if (isset($_GET["username"])) { ?> onclick="return bodyClick(event, '<?php echo js_escape(DB); ?>', '<?php echo js_escape($_GET["ns"]); ?>');"<?php } ?> onload="bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info, 0, 3) : ""); ?>', '<?php echo $protocol; ?>');<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verifyVersion('$protocol');"); ?>">
|
||||
<script type="text/javascript" src="../adminer/static/functions.js"></script>
|
||||
<script type="text/javascript" src="static/editing.js"></script>
|
||||
|
||||
|
|
|
@ -372,9 +372,10 @@ function selectDblClick(td, event, text) {
|
|||
/** Load link by AJAX
|
||||
* @param MouseEvent
|
||||
* @param string
|
||||
* @param string
|
||||
* @return bool
|
||||
*/
|
||||
function bodyClick(event, db) {
|
||||
function bodyClick(event, db, ns) {
|
||||
if (event.getPreventDefault ? event.getPreventDefault() : !event.returnValue) {
|
||||
return false;
|
||||
}
|
||||
|
@ -384,7 +385,8 @@ function bodyClick(event, db) {
|
|||
}
|
||||
if (/^a$/i.test(el.tagName) && !/^https?:|#/i.test(el.getAttribute('href')) && /[&?]username=/.exec(el.href)) {
|
||||
var match = /&db=([^&]*)/.exec(el.href);
|
||||
return !(db == (match ? match[1] : '') && ajaxMain(el.href, '', event));
|
||||
var match2 = /&ns=([^&]*)/.exec(el.href);
|
||||
return !(db == (match ? match[1] : '') && scheme == (match2 ? match2[1] : '') && ajaxMain(el.href, '', event));
|
||||
}
|
||||
if (/^input$/i.test(el.tagName) && /submit|image/.test(el.type) && el.name != 'logout' && !/&(database|scheme|create|view|sql|user)=/.test(location.href)) {
|
||||
return !ajaxForm(el.form, (el.name ? encodeURIComponent(el.name) + '=1' : ''));
|
||||
|
|
Loading…
Reference in a new issue