From 3be186360686d07efa34c005248097914a8eced1 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 5 Feb 2011 07:34:56 -0500 Subject: [PATCH] Conditional Ajax on sorting results --- js/sql.js | 6 ++++-- libraries/display_tbl.lib.php | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/js/sql.js b/js/sql.js index f4fe70847..1cae3c515 100644 --- a/js/sql.js +++ b/js/sql.js @@ -269,6 +269,7 @@ $(document).ready(function() { * @memberOf jQuery * @name paginate_nav_button_click * @uses PMA_ajaxShowMessage() + * @see $cfg['AjaxEnable'] */ $("input[name=navig].ajax").live('click', function(event) { /** @lends jQuery */ @@ -293,11 +294,11 @@ $(document).ready(function() { * Paginate results with Page Selector dropdown * @memberOf jQuery * @name paginate_dropdown_change + * @see $cfg['AjaxEnable'] */ $("#pageselector").live('change', function(event) { var $the_form = $(this).parent("form"); - // see $cfg['AjaxEnable'] if ($(this).hasClass('ajax')) { event.preventDefault(); @@ -317,8 +318,9 @@ $(document).ready(function() { * Ajax Event handler for sorting the results table * @memberOf jQuery * @name table_results_sort_click + * @see $cfg['AjaxEnable'] */ - $("#table_results").find("a[title=Sort]").live('click', function(event) { + $("#table_results.ajax").find("a[title=Sort]").live('click', function(event) { event.preventDefault(); PMA_ajaxShowMessage(); diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index 875cff22e..082e93cd2 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -623,7 +623,11 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ echo '' . "\n"; } - echo '' . "\n"; + echo '
' . "\n"; if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') { echo '' . "\n";