Permalink
Browse files

Fix AJAX history after reload

  • Loading branch information...
1 parent 5ee1407 commit fa832055c8ef946b16f1cdc25793d4a0a48ad8e5 @vrana committed Mar 24, 2011
Showing with 11 additions and 2 deletions.
  1. +3 −1 adminer/static/editing.js
  2. +2 −0 adminer/static/functions.js
  3. +3 −0 changes.txt
  4. +3 −1 editor/static/editing.js
@@ -4,7 +4,9 @@
* @param string first three characters of database system 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 script = document.createElement('script');
script.src = jushRoot + 'jush.js';
@@ -367,6 +367,8 @@ function ajaxSend(url, data, popState) {
onpopstate = function (event) {
if (event.state ? confirm(areYouSure) : ajaxState) {
ajaxSend(location.href, event.state, 1); // 1 - disable pushState
+ } else {
+ ajaxState++;
}
}
View
@@ -1,3 +1,6 @@
+Adminer 3.2.2-dev:
+Fix AJAX history after reload
+
Adminer 3.2.1 (released 2011-03-23):
Ability to save expression in edit
Respect default database collation (bug #3191489)
@@ -1,5 +1,7 @@
// Editor specific functions
function bodyLoad(version) {
- onpopstate(history);
+ if (history.state !== undefined) {
+ onpopstate(history);
+ }
}

0 comments on commit fa83205

Please sign in to comment.