diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2014-06-26 11:31:21 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2014-06-26 11:31:21 +0200 |
commit | 50177172e4f6ef9fd9200d2d8dfee02b1cf46834 (patch) | |
tree | daad3794deecb8ebd342a59ea41d43cbfddf409b | |
parent | 0ebb250164cb17a980724f0cf8935c81e12909b9 (diff) |
Apply selection styles to clones search result items, too
-rw-r--r-- | program/js/treelist.js | 10 |
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); } |