]> git.joonet.de Git - adminer.git/commitdiff
Don't scroll with AJAX select order and alter move column
authorJakub Vrana <jakub@vrana.cz>
Thu, 28 Jul 2011 12:25:16 +0000 (14:25 +0200)
committerJakub Vrana <jakub@vrana.cz>
Thu, 28 Jul 2011 12:25:16 +0000 (14:25 +0200)
adminer/static/functions.js
changes.txt

index 601402ff9bc9392ab9fcce7e1f7c06253afd7c7a..182e803d80e103f0d7971ddb4d7ff6f2a82800af 100644 (file)
@@ -309,7 +309,7 @@ function ajaxSend(url, data, popState, noscroll) {
                                                history.pushState(data, '', url); //! remember window position
                                        }
                                }
-                               if (!noscroll) {
+                               if (!noscroll && !/&order/.test(url)) {
                                        scrollTo(0, 0);
                                }
                                setHtml('content', xmlhttp.responseText);
@@ -376,9 +376,9 @@ function ajaxForm(form, data, noscroll) {
                params.push(data);
        }
        if (form.method == 'post') {
-               return ajaxSend((/\?/.test(form.action) ? form.action : location.href), params.join('&'), noscroll); // ? - always part of Adminer URL
+               return ajaxSend((/\?/.test(form.action) ? form.action : location.href), params.join('&'), false, noscroll); // ? - always part of Adminer URL
        }
-       return ajaxSend((form.action || location.href).replace(/\?.*/, '') + '?' + params.join('&'), noscroll);
+       return ajaxSend((form.action || location.href).replace(/\?.*/, '') + '?' + params.join('&'), '', false, noscroll);
 }
 
 
index 19b5844dfc659f5af86a2e36782bfc976fe99880..9209e3dd09acb02cae6a3e42669a7a1bc3793098 100644 (file)
@@ -1,3 +1,6 @@
+Adminer 3.3.2-dev:
+Don't scroll with AJAX select order and alter move column
+
 Adminer 3.3.1 (released 2011-07-27):
 Fix XSS introduced in Adminer 3.2.0
 Fix altering default values (PostgreSQL)