diff options
author | Sergey Leshchenko <me@gramotei.net> | 2012-10-11 21:37:47 +0400 |
---|---|---|
committer | Sergey Leshchenko <me@gramotei.net> | 2012-10-11 21:37:47 +0400 |
commit | b4386b0e48d83faf064cde9c8cb253426178c1d6 (patch) | |
tree | 7a9dce251ffd016642d51bcfd04147c2d888cff0 /js/tbl_select.js | |
parent | 8aa158c656321338059befd7259a2704be2148d8 (diff) |
Fixes bug #3575799
Unary operators doesn't work without criteria values
Diffstat (limited to 'js/tbl_select.js')
-rw-r--r-- | js/tbl_select.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/js/tbl_select.js b/js/tbl_select.js index f04b4e3553..ec274dc5aa 100644 --- a/js/tbl_select.js +++ b/js/tbl_select.js @@ -42,6 +42,12 @@ $(function() { * (see $GLOBALS['cfg']['AjaxEnable']) */ $("#tbl_search_form.ajax").live('submit', function(event) { + var unaryFunctions = [ + 'IS NULL', + 'IS NOT NULL', + "= ''", + "!= ''"]; + // jQuery object to reuse $search_form = $(this); event.preventDefault(); @@ -64,8 +70,12 @@ $(function() { } }); var columnCount = $('select[name="columnsToDisplay[]"] 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['criteriaColumnOperators[' + a + ']'], unaryFunctions) >= 0) { + continue; + } + if (values['criteriaValues[' + a + ']'] == '') { delete values['criteriaValues[' + a + ']']; delete values['criteriaColumnOperators[' + a + ']']; |