Conditional Ajax on SQL query form
This commit is contained in:
@@ -208,10 +208,11 @@ $(document).ready(function() {
|
||||
* Ajax Event handler for 'SQL Query Submit'
|
||||
*
|
||||
* @see PMA_ajaxShowMessage()
|
||||
* @see $cfg['AjaxEnable']
|
||||
* @memberOf jQuery
|
||||
* @name sqlqueryform_submit
|
||||
*/
|
||||
$("#sqlqueryform").live('submit', function(event) {
|
||||
$("#sqlqueryform.ajax").live('submit', function(event) {
|
||||
event.preventDefault();
|
||||
// remove any div containing a previous error message
|
||||
$('.error').remove();
|
||||
|
@@ -115,7 +115,11 @@ function PMA_sqlQueryForm($query = true, $display_tab = false, $delimiter = ';')
|
||||
return checkSqlQuery(this)">
|
||||
<?php
|
||||
} else {
|
||||
echo '<form method="post" action="import.php" ' . $enctype . ' id="sqlqueryform"'
|
||||
echo '<form method="post" action="import.php" ' . $enctype;
|
||||
if ($GLOBALS['cfg']['AjaxEnable']) {
|
||||
echo ' class="ajax"';
|
||||
}
|
||||
echo ' id="sqlqueryform"'
|
||||
.' onsubmit="return checkSqlQuery(this)" name="sqlform">' . "\n";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user