From c3cac4e55d075a73029f999fb595d390499580c3 Mon Sep 17 00:00:00 2001 From: Mohamed Ashraf Date: Sat, 23 Mar 2013 05:38:25 +0200 Subject: [PATCH 1/3] Corrected reference to AJAX viable --- js/ajax.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/ajax.js b/js/ajax.js index e26fe76869..bb5e651a6c 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -151,7 +151,6 @@ var AJAX = { } AJAX.source = $(this); - $('html, body').animate({scrollTop: 0}, 'fast'); var isLink = !! href || false; @@ -163,11 +162,11 @@ var AJAX = { // Add a list of menu hashes that we have in the cache to the request params += AJAX.cache.menus.getRequestParam(); - this._debug && console.log("Loading: " + url); // no need to translate + AJAX._debug && console.log("Loading: " + url); // no need to translate if (isLink) { AJAX.active = true; - this.$msgbox = PMA_ajaxShowMessage(); + AJAX.$msgbox = PMA_ajaxShowMessage(); $.get(url, params, AJAX.responseHandler); } else { /** @@ -176,11 +175,12 @@ var AJAX = { * handler defined below. Workaround for bug #3583316 */ var onsubmit = $(this).data('onsubmit'); + alert(onsubmit); // Submit the request if there is no onsubmit handler // or if it returns a value that evaluates to true if (typeof onsubmit !== 'function' || onsubmit.apply(this, [event])) { AJAX.active = true; - this.$msgbox = PMA_ajaxShowMessage(); + AJAX.$msgbox = PMA_ajaxShowMessage(); $.post(url, params, AJAX.responseHandler); } } From 4a04dfb4048c63c528f69cc73d5a5f7532a8a7ee Mon Sep 17 00:00:00 2001 From: Mohamed Ashraf Date: Sat, 23 Mar 2013 05:38:36 +0200 Subject: [PATCH 2/3] Add missing ! to return value --- sql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql.php b/sql.php index 8e5716dc83..f670b658a5 100644 --- a/sql.php +++ b/sql.php @@ -1298,7 +1298,7 @@ if ((0 == $num_rows && 0 == $unlim_num_rows) || $is_affected) { . '&id_bookmark=1'; echo '
'; echo PMA_generate_common_hidden_inputs(); echo ''; From fee06d3384b30130a21163042f8d10e05c0ba89c Mon Sep 17 00:00:00 2001 From: Mohamed Ashraf Date: Sat, 23 Mar 2013 08:20:50 +0200 Subject: [PATCH 3/3] Removed alert that was used during debuging --- js/ajax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ajax.js b/js/ajax.js index bb5e651a6c..25b4cdde77 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -151,6 +151,7 @@ var AJAX = { } AJAX.source = $(this); + $('html, body').animate({scrollTop: 0}, 'fast'); var isLink = !! href || false; @@ -175,7 +176,6 @@ var AJAX = { * handler defined below. Workaround for bug #3583316 */ var onsubmit = $(this).data('onsubmit'); - alert(onsubmit); // Submit the request if there is no onsubmit handler // or if it returns a value that evaluates to true if (typeof onsubmit !== 'function' || onsubmit.apply(this, [event])) {