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
|
* Ajax Event handler for the display options
|
||||||
* @memberOf jQuery
|
* @memberOf jQuery
|
||||||
* @name displayOptionsForm_submit
|
* @name displayOptionsForm_submit
|
||||||
|
* @see $cfg['AjaxEnable']
|
||||||
*/
|
*/
|
||||||
$("#displayOptionsForm").live('submit', function(event) {
|
$("#displayOptionsForm.ajax").live('submit', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
$.post($(this).attr('action'), $(this).serialize() + '&ajax_request=true' , function(data) {
|
$form = $(this);
|
||||||
$("#sqlqueryresults").html(data);
|
|
||||||
$("#sqlqueryresults").trigger('appendAnchor');
|
$.post($form.attr('action'), $form.serialize() + '&ajax_request=true' , function(data) {
|
||||||
|
$("#sqlqueryresults")
|
||||||
|
.html(data)
|
||||||
|
.trigger('appendAnchor');
|
||||||
}) // end $.post()
|
}) // end $.post()
|
||||||
})
|
})
|
||||||
//end displayOptionsForm handler
|
//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)
|
// Display options (if we are not in print view)
|
||||||
if (! (isset($GLOBALS['printview']) && $GLOBALS['printview'] == '1')) {
|
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(
|
$url_params = array(
|
||||||
'db' => $db,
|
'db' => $db,
|
||||||
'table' => $table,
|
'table' => $table,
|
||||||
|
Reference in New Issue
Block a user