Advanced search: fix a side effect of the new behaviour "validate the draft" when the criteria is closed by a click outside of it's box

- when a criteria is being edited and the user click on search/refresh button, the search handler now update the criteria BEFORE making the ajax call

SVN:trunk[5804]
This commit is contained in:
Bruno Da Silva
2018-05-22 13:20:07 +00:00
parent 0f9994ac74
commit bef8fd566f

View File

@@ -946,8 +946,17 @@ $(function()
// Button handlers
_onSubmitClick: function(oEvent)
{
// Assertion: the search is already up to date
this._submit();
//if there is an opened criteria let's get it's new value before processing
if (this.elements.criterion_area.find('.sf_criteria.opened').length > 0)
{
this.elements.criterion_area.find('.sf_criteria.opened').trigger('itop.search.criteria.close');
setTimeout(this._submit.call(this), 300);
}
else
{
this._submit();
}
},