mirror of
https://github.com/zadam/trilium.git
synced 2025-10-31 18:36:30 +01:00
refactoring of tree handling to recommended fancytree
This commit is contained in:
@@ -2,16 +2,10 @@ import utils from './utils.js';
|
||||
import hoistedNoteService from './hoisted_note.js';
|
||||
import treeCache from "./tree_cache.js";
|
||||
|
||||
const $tree = $("#tree");
|
||||
|
||||
async function getParentProtectedStatus(node) {
|
||||
return await hoistedNoteService.isRootNode(node) ? 0 : node.getParent().data.isProtected;
|
||||
}
|
||||
|
||||
function getNodeByKey(key) {
|
||||
return $tree.fancytree('getNodeByKey', key);
|
||||
}
|
||||
|
||||
function getNoteIdFromNotePath(notePath) {
|
||||
if (!notePath) {
|
||||
return null;
|
||||
@@ -123,7 +117,6 @@ async function getNotePathTitle(notePath) {
|
||||
|
||||
export default {
|
||||
getParentProtectedStatus,
|
||||
getNodeByKey,
|
||||
getNotePath,
|
||||
getNoteIdFromNotePath,
|
||||
getNoteIdAndParentIdFromNotePath,
|
||||
|
||||
Reference in New Issue
Block a user