diff options
author | thomascube <thomas@roundcube.net> | 2008-12-18 17:56:50 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2008-12-18 17:56:50 +0000 |
commit | 1553b3c7019285a4b333531dcce2013f79c963c1 (patch) | |
tree | 6f7ca94e1d3d6aab99387502fa00b8f94a96470c /program/js/app.js | |
parent | 0456f83bcc274c30cb353f2c9bccd30aa3a32853 (diff) |
Bugfix and improve auto-completion
Diffstat (limited to 'program/js/app.js')
-rw-r--r-- | program/js/app.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/program/js/app.js b/program/js/app.js index 7e9509ec2..a09a11c77 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -2535,7 +2535,7 @@ function rcube_webmail() this.ksearch_display_results = function (a_results, a_result_ids, c) { // display search results - if (c && a_results.length) { + if (c && a_results.length && this.ksearch_input) { var p, ul, li; // create results pane if not present @@ -2554,7 +2554,7 @@ function rcube_webmail() // add each result line to list for (i=0; i<a_results.length; i++) { li = document.createElement('LI'); - li.innerHTML = a_results[i].replace(/</, '<').replace(/>/, '>').replace(new RegExp('('+this.ksearch_value+')', 'ig'), '<b>$1</b>'); + li.innerHTML = a_results[i].replace(new RegExp('('+this.ksearch_value+')', 'ig'), '##$1%%').replace(/</g, '<').replace(/>/g, '>').replace(/##([^%]+)%%/g, '<b>$1</b>'); li.onmouseover = function(){ ref.ksearch_select(this); }; li.onmouseup = function(){ ref.ksearch_click(this) }; li._rcm_id = a_result_ids[i]; |