mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
refactoring utils into module
This commit is contained in:
@@ -4,7 +4,7 @@ const treeUtils = (function() {
|
||||
const $tree = $("#tree");
|
||||
|
||||
function getParentProtectedStatus(node) {
|
||||
return isTopLevelNode(node) ? 0 : node.getParent().data.isProtected;
|
||||
return utils.isTopLevelNode(node) ? 0 : node.getParent().data.isProtected;
|
||||
}
|
||||
|
||||
function getNodeByKey(key) {
|
||||
@@ -20,7 +20,7 @@ const treeUtils = (function() {
|
||||
function getNotePath(node) {
|
||||
const path = [];
|
||||
|
||||
while (node && !isRootNode(node)) {
|
||||
while (node && !utils.isRootNode(node)) {
|
||||
if (node.data.noteId) {
|
||||
path.push(node.data.noteId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user