don't allow deleting hoisted note + other related fixes, closes #488

This commit is contained in:
zadam
2019-04-16 21:40:04 +02:00
parent 3760835608
commit 064a11d872
12 changed files with 66 additions and 54 deletions

View File

@@ -86,10 +86,10 @@ $("#note-menu-button").click(async e => {
enabled: isNotRoot && parentNote.type !== 'search' }
];
contextMenuWidget.initContextMenu(e, items, (event, cmd) => {
contextMenuWidget.initContextMenu(e, items, async (event, cmd) => {
if (cmd === "insertNoteAfter") {
const parentNoteId = node.data.parentNoteId;
const isProtected = treeUtils.getParentProtectedStatus(node);
const isProtected = await treeUtils.getParentProtectedStatus(node);
treeService.createNote(node, parentNoteId, 'after', { isProtected: isProtected });
}