]> git.joonet.de Git - adminer.git/commitdiff
Fix AJAX history after reload
authorJakub Vrana <jakub@vrana.cz>
Thu, 24 Mar 2011 07:24:57 +0000 (08:24 +0100)
committerJakub Vrana <jakub@vrana.cz>
Thu, 24 Mar 2011 07:24:57 +0000 (08:24 +0100)
adminer/static/editing.js
adminer/static/functions.js
changes.txt
editor/static/editing.js

index 757d8ee2bc6bc9cb1996e44b87eff07e010a8d49..3280d1ef31c76c774b503955c9d87b5fcbe4a1b1 100644 (file)
@@ -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';
index f2c76579cd411270916f12b8366d7632d4c7324d..456980310adf268c53f8347a28197a17bf3123a2 100644 (file)
@@ -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++;
        }
 }
 
index c9c477eb27eb39da5204f19ce4a0021281609c40..7143ae607945d18e59eb2205c9c671f4e315808f 100644 (file)
@@ -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)
index b58ed71aff434b8a972742dcb8200b0550df320a..39c9af977437bf168a032a312e5a0e2675f41f37 100644 (file)
@@ -1,5 +1,7 @@
 // Editor specific functions
 
 function bodyLoad(version) {
-       onpopstate(history);
+       if (history.state !== undefined) {
+               onpopstate(history);
+       }
 }