Fix AJAX history after reload

This commit is contained in:
Jakub Vrana 2011-03-24 08:24:57 +01:00
parent 5ee14079b8
commit fa832055c8
4 changed files with 11 additions and 2 deletions

View file

@ -4,7 +4,9 @@
* @param string first three characters of database system version * @param string first three characters of database system version
*/ */
function bodyLoad(version) { function bodyLoad(version) {
onpopstate(history); // copied from editor/static/editing.js if (history.state !== undefined) { // copied from editor/static/editing.js
onpopstate(history);
}
var jushRoot = '../externals/jush/'; var jushRoot = '../externals/jush/';
var script = document.createElement('script'); var script = document.createElement('script');
script.src = jushRoot + 'jush.js'; script.src = jushRoot + 'jush.js';

View file

@ -367,6 +367,8 @@ function ajaxSend(url, data, popState) {
onpopstate = function (event) { onpopstate = function (event) {
if (event.state ? confirm(areYouSure) : ajaxState) { if (event.state ? confirm(areYouSure) : ajaxState) {
ajaxSend(location.href, event.state, 1); // 1 - disable pushState ajaxSend(location.href, event.state, 1); // 1 - disable pushState
} else {
ajaxState++;
} }
} }

View file

@ -1,3 +1,6 @@
Adminer 3.2.2-dev:
Fix AJAX history after reload
Adminer 3.2.1 (released 2011-03-23): Adminer 3.2.1 (released 2011-03-23):
Ability to save expression in edit Ability to save expression in edit
Respect default database collation (bug #3191489) Respect default database collation (bug #3191489)

View file

@ -1,5 +1,7 @@
// Editor specific functions // Editor specific functions
function bodyLoad(version) { function bodyLoad(version) {
onpopstate(history); if (history.state !== undefined) {
onpopstate(history);
}
} }