mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 09:34:10 +02:00
Confirm AJAX POST reload
This commit is contained in:
@@ -29,6 +29,9 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
|
||||
<?php } ?>
|
||||
|
||||
<body class="<?php echo lang('ltr'); ?>" onclick="return bodyClick(event, '<?php echo js_escape(DB); ?>', '<?php echo js_escape($_GET["ns"]); ?>');" onload="bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info, 0, 3) : ""); ?>');<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verifyVersion('$protocol');"); ?>">
|
||||
<script type="text/javascript">
|
||||
var areYouSure = '<?php echo lang('Are you sure?'); ?>';
|
||||
</script>
|
||||
<script type="text/javascript" src="../adminer/static/functions.js"></script>
|
||||
<script type="text/javascript" src="static/editing.js"></script>
|
||||
|
||||
|
@@ -356,7 +356,9 @@ function ajaxMain(url, data, event) {
|
||||
* @param PopStateEvent|history
|
||||
*/
|
||||
onpopstate = function (event) {
|
||||
ajaxSend(location.href, event.state, 1); // 1 - disable pushState
|
||||
if (!event.state || confirm(areYouSure)) {
|
||||
ajaxSend(location.href, event.state, 1); // 1 - disable pushState
|
||||
}
|
||||
}
|
||||
|
||||
/** Send form by AJAX GET
|
||||
|
Reference in New Issue
Block a user