Minor fixes for teelist searching

pull/190/head
Thomas Bruederli 11 years ago
parent b08986f375
commit 072f1aa97b

@ -282,6 +282,7 @@ function rcube_treelist_widget(node, p)
search_active = search_;
// add clone to current search results (top level)
if (!li.is(':visible')) {
$('<li>')
.attr('id', li.attr('id') + '--xsR')
.attr('class', li.attr('class'))
@ -290,6 +291,7 @@ function rcube_treelist_widget(node, p)
.appendTo(container);
}
}
}
// insert at top level
else {
data.push(node);
@ -434,7 +436,7 @@ function rcube_treelist_widget(node, p)
var search_tree = function(items) {
$.each(items, function(i, node) {
var li, sli;
if (!node.virtual && !node.deleted && String(node.text).toLowerCase().indexOf(q) >= 0) {
if (!node.virtual && !node.deleted && String(node.text).toLowerCase().indexOf(q) >= 0 && hits.indexOf(node.id) < 0) {
li = id2dom(node.id);
sli = $('<li>')
.attr('id', li.attr('id') + '--xsR')

@ -439,8 +439,7 @@ a.iconbutton.searchoptions {
background-position: -2px -317px;
}
a.iconbutton.searchicon,
a.iconbutton.searchoptions {
a.iconbutton.searchicon {
width: 15px;
}

Loading…
Cancel
Save