tree converted to module

This commit is contained in:
azivner
2017-11-04 19:28:49 -04:00
parent e7f0187b29
commit 9880a4d6f6
7 changed files with 308 additions and 286 deletions

View File

@@ -1,3 +1,5 @@
const treeEl = $("#tree");
function getParentKey(node) {
return (node.getParent() === null || node.getParent().key === "root_1") ? "root" : node.getParent().key;
}
@@ -7,7 +9,7 @@ function getParentEncryption(node) {
}
function getNodeByKey(noteId) {
return glob.tree.fancytree('getNodeByKey', noteId);
return treeEl.fancytree('getNodeByKey', noteId);
}
function getNoteTitle(noteId) {