summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-02-22 11:26:25 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-02-22 11:26:25 +0000
commit1630f333bc34c70d3e753456a24ada983c6a4bce (patch)
tree1aa1c96a25cece2550034648260756632e8838cf /roundcubemail/program
parent6144caa0ca3e3bf0bbed5e7930e554815ae98468 (diff)
- Fix email address auto-completion shows regexp pattern (#1486258)
git-svn-id: https://svn.roundcube.net/trunk@3281 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/js/app.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index 747a69f4e..c5bac8554 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/program/js/app.js
@@ -2806,8 +2806,8 @@ function rcube_webmail()
this.ksearch_display_results = function (a_results)
{
// display search results
- if (a_results.length && this.ksearch_input) {
- var p, ul, li;
+ if (a_results.length && this.ksearch_input && this.ksearch_value) {
+ var p, ul, li, s_val = this.ksearch_value;
// create results pane if not present
if (!this.ksearch_pane) {
@@ -2819,11 +2819,11 @@ function rcube_webmail()
// remove all search results
ul = this.ksearch_pane.__ul;
ul.innerHTML = '';
-
+
// add each result line to list
for (i=0; i<a_results.length; i++) {
li = document.createElement('LI');
- 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.innerHTML = a_results[i].replace(new RegExp('('+s_val+')', '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 = i;