From 1aead23242100520ad46458586b54fd022d0c719 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 Oct 2010 21:32:54 +0000 Subject: [PATCH] Fix: Use a better way to bold search criteria (no use of javascript regex, but use php regex). Usage of * was making javascript crazy. Fix: When field is manually cleaned, we must also clean hidden fields. New: Can define number of char before showing first answer --- htdocs/lib/ajax.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/lib/ajax.lib.php b/htdocs/lib/ajax.lib.php index 74b54df8cd9..f71ddf88836 100644 --- a/htdocs/lib/ajax.lib.php +++ b/htdocs/lib/ajax.lib.php @@ -121,6 +121,7 @@ function ajax_autocompleter($selected='',$htmlname,$url,$option='') jQuery("#'.$htmlname.'").val(item.key); } var label = item.label.toString(); + //label = label.replace(new RegExp("("+request.term+")","i"),"$1"); return { label: label, value: item.value, id: item.key} })); }, "json");