summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-08-08 12:52:26 +0200
committerAleksander Machniak <alec@alec.pl>2014-08-08 12:52:26 +0200
commit66233b76c83b8e31bc1ff301352393299130a18c (patch)
treef9b1d88a7699aa8e1e6ddfb16b691b6c48a6e67a /program/js
parent00dd283999fd42870bc2ea8412a4e39f7c52060c (diff)
Added folder searching in Folder Manager
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js4
-rw-r--r--program/js/treelist.js3
2 files changed, 5 insertions, 2 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 8ac5ca2e9..346c4f75d 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -5743,13 +5743,15 @@ function rcube_webmail()
selectable: true,
id_prefix: 'rcmli',
id_encode: this.html_identifier_encode,
- id_decode: this.html_identifier_decode
+ id_decode: this.html_identifier_decode,
+ searchbox: '#foldersearch'
});
this.subscription_list
.addEventListener('select', function(node) { ref.subscription_select(node.id); })
.addEventListener('collapse', function(node) { ref.folder_collapsed(node) })
.addEventListener('expand', function(node) { ref.folder_collapsed(node) })
+ .addEventListener('search', function(p) { if (p.query) ref.subscription_select(); })
.draggable({cancel: 'li.mailbox.root'})
.droppable({
// @todo: find better way, accept callback is executed for every folder
diff --git a/program/js/treelist.js b/program/js/treelist.js
index 916cf0e2d..7d13143cd 100644
--- a/program/js/treelist.js
+++ b/program/js/treelist.js
@@ -525,7 +525,8 @@ function rcube_treelist_widget(node, p)
.attr('id', li.attr('id') + '--xsR')
.attr('class', li.attr('class'))
.addClass('searchresult__')
- .append(li.children().first().clone(true, true))
+ // append all elements like links and inputs, but not sub-trees
+ .append(li.children(':not(div.treetoggle,ul)').clone(true, true))
.appendTo(container);
hits.push(node.id);
}