|
|
|
@ -71,7 +71,8 @@ const contextMenu = (function() {
|
|
|
|
{title: "Paste into <kbd>Ctrl+V</kbd>", cmd: "pasteInto", uiIcon: "ui-icon-clipboard"},
|
|
|
|
{title: "Paste into <kbd>Ctrl+V</kbd>", cmd: "pasteInto", uiIcon: "ui-icon-clipboard"},
|
|
|
|
{title: "Paste after", cmd: "pasteAfter", uiIcon: "ui-icon-clipboard"},
|
|
|
|
{title: "Paste after", cmd: "pasteAfter", uiIcon: "ui-icon-clipboard"},
|
|
|
|
{title: "----"},
|
|
|
|
{title: "----"},
|
|
|
|
{title: "Collapse sub-tree <kbd>Alt+-</kbd>", cmd: "collapse-sub-tree", uiIcon: "ui-icon-minus"}
|
|
|
|
{title: "Collapse sub-tree <kbd>Alt+-</kbd>", cmd: "collapse-sub-tree", uiIcon: "ui-icon-minus"},
|
|
|
|
|
|
|
|
{title: "Force note sync", cmd: "force-note-sync", uiIcon: "ui-icon-refresh"}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
beforeOpen: (event, ui) => {
|
|
|
|
beforeOpen: (event, ui) => {
|
|
|
|
const node = $.ui.fancytree.getNode(ui.target);
|
|
|
|
const node = $.ui.fancytree.getNode(ui.target);
|
|
|
|
@ -125,6 +126,9 @@ const contextMenu = (function() {
|
|
|
|
else if (ui.cmd === "collapse-sub-tree") {
|
|
|
|
else if (ui.cmd === "collapse-sub-tree") {
|
|
|
|
noteTree.collapseTree(node);
|
|
|
|
noteTree.collapseTree(node);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (ui.cmd === "force-note-sync") {
|
|
|
|
|
|
|
|
forceNoteSync(node.data.note_id);
|
|
|
|
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
messaging.logError("Unknown command: " + ui.cmd);
|
|
|
|
messaging.logError("Unknown command: " + ui.cmd);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|