From 1630f333bc34c70d3e753456a24ada983c6a4bce Mon Sep 17 00:00:00 2001 From: alec Date: Mon, 22 Feb 2010 11:26:25 +0000 Subject: - Fix email address auto-completion shows regexp pattern (#1486258) git-svn-id: https://svn.roundcube.net/trunk@3281 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/CHANGELOG | 1 + roundcubemail/program/js/app.js | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index e4d54f91a..5e0460ae3 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG RoundCube Webmail =========================== +- Fix email address auto-completion shows regexp pattern (#1486258) - Fix merging of configuration parameters: user prefs always survive (#1486368) - Fix quota indicator value after folder purge/expunge (#1486488) - Fix external mailto links support for use as protocol handler (#1486037) 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/g, '>').replace(/##([^%]+)%%/g, '$1'); + li.innerHTML = a_results[i].replace(new RegExp('('+s_val+')', 'ig'), '##$1%%').replace(//g, '>').replace(/##([^%]+)%%/g, '$1'); li.onmouseover = function(){ ref.ksearch_select(this); }; li.onmouseup = function(){ ref.ksearch_click(this) }; li._rcm_id = i; -- cgit v1.2.3