Conditional Ajax on display Options
This commit is contained in:
12
js/sql.js
12
js/sql.js
@@ -338,13 +338,17 @@ $(document).ready(function() {
|
||||
* Ajax Event handler for the display options
|
||||
* @memberOf jQuery
|
||||
* @name displayOptionsForm_submit
|
||||
* @see $cfg['AjaxEnable']
|
||||
*/
|
||||
$("#displayOptionsForm").live('submit', function(event) {
|
||||
$("#displayOptionsForm.ajax").live('submit', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
$.post($(this).attr('action'), $(this).serialize() + '&ajax_request=true' , function(data) {
|
||||
$("#sqlqueryresults").html(data);
|
||||
$("#sqlqueryresults").trigger('appendAnchor');
|
||||
$form = $(this);
|
||||
|
||||
$.post($form.attr('action'), $form.serialize() + '&ajax_request=true' , function(data) {
|
||||
$("#sqlqueryresults")
|
||||
.html(data)
|
||||
.trigger('appendAnchor');
|
||||
}) // end $.post()
|
||||
})
|
||||
//end displayOptionsForm handler
|
||||
|
@@ -540,7 +540,11 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
|
||||
|
||||
// Display options (if we are not in print view)
|
||||
if (! (isset($GLOBALS['printview']) && $GLOBALS['printview'] == '1')) {
|
||||
echo '<form method="post" action="sql.php" name="displayOptionsForm" id="displayOptionsForm">';
|
||||
echo '<form method="post" action="sql.php" name="displayOptionsForm" id="displayOptionsForm"';
|
||||
if ($GLOBALS['cfg']['AjaxEnable']) {
|
||||
echo ' class="ajax" ';
|
||||
}
|
||||
echo '>';
|
||||
$url_params = array(
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
|
Reference in New Issue
Block a user