diff options
Diffstat (limited to 'program/js/treelist.js')
-rw-r--r-- | program/js/treelist.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/program/js/treelist.js b/program/js/treelist.js index d940e396c..d856fc8ff 100644 --- a/program/js/treelist.js +++ b/program/js/treelist.js @@ -56,6 +56,7 @@ function rcube_treelist_widget(node, p) this.collapse = collapse; this.select = select; this.render = render; + this.reset = reset; this.drag_start = drag_start; this.drag_end = drag_end; this.intersects = intersects; @@ -80,6 +81,7 @@ function rcube_treelist_widget(node, p) // register click handlers on list container.on('click', 'div.treetoggle', function(e){ toggle(dom2id($(this).parent())); + e.stopPropagation(); }); container.on('click', 'li', function(e){ @@ -314,6 +316,20 @@ function rcube_treelist_widget(node, p) } /** + * + */ + function reset() + { + select(''); + + data = []; + indexbyid = {}; + drag_active = false; + + container.html(''); + } + + /** * Render the tree list from the internal data structure */ function render() |