N°1499 : Edge case where picking a datetime and pressing enter would not close the criterion

SVN:trunk[5857]
This commit is contained in:
Stephen Abello
2018-06-13 09:49:49 +00:00
parent 12af164dcc
commit 7031a52a43
2 changed files with 25 additions and 25 deletions

View File

@@ -184,7 +184,7 @@ $(function()
}
else
{
console.log('search form criteria: callback type must be a function or a existing function name of the widget');
me._trace('search form criteria: callback type must be a function or a existing function name of the widget');
return false;
}
});

View File

@@ -114,7 +114,7 @@ $(function()
.attr('for', oInputElem.attr('id'))
;
//no arrivla, the date is always formated yyy-mm-dd, we need to apply the user's formating and to write it into both the dom and the values array.
//on arrival, the date is always formated yyy-mm-dd, we need to apply the user's formating and to write it into both the dom and the values array.
if (oInputParam.value_index in aValues && typeof aValues[oInputParam.value_index].value != 'undefined' && aValues[oInputParam.value_index].value != '')
{
//ie9 do not hadle the timezone like the other browsers, so wee need to make extra computation in order to be sure to obtain consistency accross browsers : we declare the date without the UTC offset (the suffix "Z", then wee add the timezone offset
@@ -128,9 +128,6 @@ $(function()
}
oContentElem = oContentElem.add(oOpContentElem);
}
// - Apply on "enter" key hit
//todo: this could be refactored
@@ -148,10 +145,13 @@ $(function()
{
var inputElem = $(this).find('input[type="text"]');
inputElem.val(inputElem.val().trim());
inputElem[oInputParam.x_picker]('hide');
//Closing the criterion because the datetime picker widget catches the keydown event
me._close();
me._apply();
}
});
}
oOpElem
.find('.sfc_op_name')
.remove()