Advanced search: UI/UX, remove [not_]empty operators on fields that can't be null.

SVN:b1162[5575]
This commit is contained in:
Guillaume Lajarige
2018-03-29 15:15:43 +00:00
parent 7e884dc69f
commit e9444d3055

View File

@@ -97,9 +97,16 @@ $(function()
// Note: A null operator or an operator with a rank "false" will be removed.
_initOperators: function()
{
// Reset oprators
// Reset operators
this.operators = {};
// Cancel empty/not_empty operators if field can't be null
if(this.options.field.is_null_allowed === false)
{
this.options.available_operators.empty = null;
this.options.available_operators.not_empty = null;
}
// Temp array to sort operators
var aSortable = [];
for(var sOpIdx in this.options.available_operators)