summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-12-18 17:56:50 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-12-18 17:56:50 +0000
commit5ede29d35a8e674160703512a0602a1578ed16c2 (patch)
tree37dc45bd2d82031e55685ead5dc9b77c30d81393 /roundcubemail/program/js
parenta55054b937eefbc9479983cc941c062210d49ba1 (diff)
Bugfix and improve auto-completion
git-svn-id: https://svn.roundcube.net/trunk@2176 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
-rw-r--r--roundcubemail/program/js/app.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index 7e9509ec2..a09a11c77 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/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(/</, '&lt;').replace(/>/, '&gt;').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, '&lt;').replace(/>/g, '&gt;').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];