search widget : bugfix

if the selected operator is not the default one, open in "advanced" mode in order to be able to see the operator

SVN:b1162[5574]
This commit is contained in:
Bruno Da Silva
2018-03-29 12:27:30 +00:00
parent 24c7ff4cfa
commit 7e884dc69f

View File

@@ -190,13 +190,17 @@ $(function()
// Focus on right input
var oOpElemRadioChecked = this.element.find('.sfc_fg_operator .sfc_op_radio:checked');
var oOpElemInputFirst = oOpElemRadioChecked.closest('.sfc_fg_operator').find('.sfc_op_content input[type="text"]:first');
if (!oOpElemRadioChecked.is(':visible'))
oOpElemInputFirst.filter(':not([data-no-auto-focus])').trigger('click').trigger('focus');
this.element.find('.sfc_form_group').removeClass('advanced');
if (!oOpElemInputFirst.is(':visible'))
{
this.element.find('.sfc_form_group').addClass('advanced');
}
oOpElemRadioChecked.closest('.sfc_fg_operator').find('.sfc_op_content input[type="text"]:first').filter(':not([data-no-auto-focus])').trigger('click').trigger('focus');
},
_close: function()
{