summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-06-26 11:31:21 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-06-26 11:31:21 +0200
commit50177172e4f6ef9fd9200d2d8dfee02b1cf46834 (patch)
treedaad3794deecb8ebd342a59ea41d43cbfddf409b /program
parent0ebb250164cb17a980724f0cf8935c81e12909b9 (diff)
Apply selection styles to clones search result items, too
Diffstat (limited to 'program')
-rw-r--r--program/js/treelist.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/program/js/treelist.js b/program/js/treelist.js
index 7ff9d75bf..b2d838e13 100644
--- a/program/js/treelist.js
+++ b/program/js/treelist.js
@@ -226,15 +226,21 @@ function rcube_treelist_widget(node, p)
function select(id)
{
if (selection) {
- id2dom(selection).removeClass('selected').removeAttr('aria-selected');
+ id2dom(selection, true).removeClass('selected').removeAttr('aria-selected');
+ if (search_active)
+ id2dom(selection).removeClass('selected').removeAttr('aria-selected');
selection = null;
}
- var li = id2dom(id);
+ var li = id2dom(id, true);
if (li.length) {
li.addClass('selected').attr('aria-selected', 'true');
selection = id;
// TODO: expand all parent nodes if collapsed
+
+ if (search_active)
+ id2dom(id).addClass('selected').attr('aria-selected', 'true');
+
scroll_to_node(li);
}