button for collapsing tree, button for new top level note

This commit is contained in:
azivner
2017-08-29 20:58:53 -04:00
parent 36dbcfcce0
commit a7180e0e19
3 changed files with 18 additions and 5 deletions

View File

@@ -202,4 +202,12 @@ $("button#btnResetSearch").click(function () {
let tree = $("#tree").fancytree("getTree");
tree.clearFilter();
});
});
function collapseTree() {
$("#tree").fancytree("getRootNode").visit(function(node){
node.setExpanded(false);
});
}
$(document).bind('keydown', 'alt+c', collapseTree);