From f6e29f78f6cc7768a9a7b3d079d3efd3005a2685 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 12 Mar 2011 00:20:27 +0100 Subject: [PATCH] Ajax reload with POST data --- adminer/static/editing.js | 3 +++ adminer/static/functions.js | 2 +- editor/static/editing.js | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/adminer/static/editing.js b/adminer/static/editing.js index fcd9d9fd..e910faa1 100644 --- a/adminer/static/editing.js +++ b/adminer/static/editing.js @@ -4,6 +4,9 @@ * @param string first three characters of database system version */ function bodyLoad(version) { + if (history.state) { // copied from editor/static/editing.js + onpopstate(history); + } var jushRoot = '../externals/jush/'; var script = document.createElement('script'); script.src = jushRoot + 'jush.js'; diff --git a/adminer/static/functions.js b/adminer/static/functions.js index dae001c4..4200e62a 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -354,7 +354,7 @@ function ajaxMain(url, data, event) { } /** Revive page from history -* @param PopStateEvent +* @param PopStateEvent|history */ window.onpopstate = function (event) { ajaxSend(location.href, event.state, 1); // 1 - disable pushState diff --git a/editor/static/editing.js b/editor/static/editing.js index 70998ba6..47fc8e72 100644 --- a/editor/static/editing.js +++ b/editor/static/editing.js @@ -1,4 +1,7 @@ // Editor specific functions function bodyLoad(version) { + if (history.state) { + onpopstate(history); + } }