Conditional Ajax on sorting results

This commit is contained in:
Marc Delisle
2011-02-05 07:34:56 -05:00
parent f328f6d4a9
commit 3be1863606
2 changed files with 9 additions and 3 deletions

View File

@@ -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();

View File

@@ -623,7 +623,11 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
echo '<input type="hidden" name="goto" value="sql.php" />' . "\n";
}
echo '<table id="table_results" class="data">' . "\n";
echo '<table id="table_results" class="data';
if ($GLOBALS['cfg']['AjaxEnable']) {
echo ' ajax';
}
echo '">' . "\n";
if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
|| $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
echo '<thead><tr>' . "\n";