|
|
@ -2806,8 +2806,8 @@ function rcube_webmail()
|
|
|
|
this.ksearch_display_results = function (a_results)
|
|
|
|
this.ksearch_display_results = function (a_results)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// display search results
|
|
|
|
// display search results
|
|
|
|
if (a_results.length && this.ksearch_input) {
|
|
|
|
if (a_results.length && this.ksearch_input && this.ksearch_value) {
|
|
|
|
var p, ul, li;
|
|
|
|
var p, ul, li, s_val = this.ksearch_value;
|
|
|
|
|
|
|
|
|
|
|
|
// create results pane if not present
|
|
|
|
// create results pane if not present
|
|
|
|
if (!this.ksearch_pane) {
|
|
|
|
if (!this.ksearch_pane) {
|
|
|
@ -2823,7 +2823,7 @@ function rcube_webmail()
|
|
|
|
// add each result line to list
|
|
|
|
// add each result line to list
|
|
|
|
for (i=0; i<a_results.length; i++) {
|
|
|
|
for (i=0; i<a_results.length; i++) {
|
|
|
|
li = document.createElement('LI');
|
|
|
|
li = document.createElement('LI');
|
|
|
|
li.innerHTML = a_results[i].replace(new RegExp('('+this.ksearch_value+')', 'ig'), '##$1%%').replace(/</g, '<').replace(/>/g, '>').replace(/##([^%]+)%%/g, '<b>$1</b>');
|
|
|
|
li.innerHTML = a_results[i].replace(new RegExp('('+s_val+')', 'ig'), '##$1%%').replace(/</g, '<').replace(/>/g, '>').replace(/##([^%]+)%%/g, '<b>$1</b>');
|
|
|
|
li.onmouseover = function(){ ref.ksearch_select(this); };
|
|
|
|
li.onmouseover = function(){ ref.ksearch_select(this); };
|
|
|
|
li.onmouseup = function(){ ref.ksearch_click(this) };
|
|
|
|
li.onmouseup = function(){ ref.ksearch_click(this) };
|
|
|
|
li._rcm_id = i;
|
|
|
|
li._rcm_id = i;
|
|
|
|