mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-19 07:51:29 +01:00
merge develop
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
* @param string $url Ajax Url to call for request: /path/page.php. Must return a json array ('key'=>id, 'value'=>String shown into input field once selected, 'label'=>String shown into combo list)
|
||||
* @param string $urloption More parameters on URL request
|
||||
* @param int $minLength Minimum number of chars to trigger that Ajax search
|
||||
* @param int $autoselect Automatic selection if just one value
|
||||
* @param int $autoselect Automatic selection if just one value (trigger("change") on field is done is search return only 1 result)
|
||||
* @param array $ajaxoptions Multiple options array
|
||||
* - Ex: array('update'=>array('field1','field2'...)) will reset field1 and field2 once select done
|
||||
* - Ex: array('disabled'=> )
|
||||
@@ -68,6 +68,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLen
|
||||
$("input#search_'.$htmlname.'").keydown(function(e) {
|
||||
if (e.keyCode != 9) /* If not "Tab" key */
|
||||
{
|
||||
if (e.keyCode == 13) { return false; } /* disable "ENTER" key useful for barcode readers */
|
||||
console.log("Clear id previously selected for field '.$htmlname.'");
|
||||
$("#'.$htmlname.'").val("");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user