From aeae30ffb7a6d0dadab39e6c72791debc0622613 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 28 Jul 2011 14:25:16 +0200 Subject: [PATCH] Don't scroll with AJAX select order and alter move column --- adminer/static/functions.js | 6 +++--- changes.txt | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 601402ff..182e803d 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -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); } diff --git a/changes.txt b/changes.txt index 19b5844d..9209e3dd 100644 --- a/changes.txt +++ b/changes.txt @@ -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)