note tree refactorings

This commit is contained in:
azivner
2018-03-12 23:14:09 -04:00
parent 834661c461
commit e5c0acbb43
3 changed files with 49 additions and 26 deletions

View File

@@ -31,20 +31,10 @@ const treeUtils = (function() {
return path.reverse().join("/");
}
function setNodeTitleWithPrefix(node) {
const noteTitle = noteTree.getNoteTitle(node.data.noteId);
const prefix = node.data.prefix;
const title = (prefix ? (prefix + " - ") : "") + noteTitle;
node.setTitle(escapeHtml(title));
}
return {
getParentProtectedStatus,
getNodeByKey,
getNotePath,
getNoteIdFromNotePath,
setNodeTitleWithPrefix
};
})();