This commit is contained in:
Atul Pratap Singh 2012-10-12 02:20:42 +05:30
parent 5e3ebd0fd7
commit 96fe476de3

View File

@ -43,6 +43,13 @@ $(document).ready(function() {
* @uses PMA_ajaxShowMessage()
*/
$("#tbl_search_form.ajax").live('submit', function(event) {
var unaryFunctions = [
'IS NULL',
'IS NOT NULL',
"= ''",
"!= ''"];
// jQuery object to reuse
$search_form = $(this);
event.preventDefault();
@ -65,8 +72,13 @@ $(document).ready(function() {
}
});
var columnCount = $('select[name="param[]"] option').length;
// Submit values only for the columns that have a search criteria
// Submit values only for the columns that have unary column operator or a search criteria
for (var a = 0; a < columnCount; a++) {
if ($.inArray(values['func[' + a + ']'], unaryFunctions) >= 0) {
continue;
}
if (values['fields[' + a + ']'] == '') {
delete values['fields[' + a + ']'];
delete values['func[' + a + ']'];