mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 17:26:38 +01:00
more actions on jump to note dialog
This commit is contained in:
@@ -103,27 +103,16 @@ const recentNotes = (function() {
|
||||
});
|
||||
}
|
||||
|
||||
async function addAsChild(parentNotePath, childNotePath) {
|
||||
const parentNoteId = treeUtils.getNoteIdFromNotePath(parentNotePath);
|
||||
const childNoteId = treeUtils.getNoteIdFromNotePath(childNotePath);
|
||||
|
||||
await $.ajax({
|
||||
url: baseApiUrl + 'tree/' + parentNoteId + '/addChild/' + childNoteId,
|
||||
type: 'PUT',
|
||||
error: () => showError("Error adding child.")
|
||||
});
|
||||
async function addCurrentAsChild() {
|
||||
await treeUtils.addAsChild(getSelectedNotePath(), noteTree.getCurrentNotePath());
|
||||
|
||||
dialogEl.dialog("close");
|
||||
|
||||
await noteTree.reload();
|
||||
}
|
||||
|
||||
async function addCurrentAsChild() {
|
||||
await addAsChild(getSelectedNotePath(), noteTree.getCurrentNotePath());
|
||||
}
|
||||
|
||||
async function addRecentAsChild() {
|
||||
addAsChild(noteTree.getCurrentNotePath(), getSelectedNotePath());
|
||||
await treeUtils.addAsChild(noteTree.getCurrentNotePath(), getSelectedNotePath());
|
||||
|
||||
dialogEl.dialog("close");
|
||||
}
|
||||
|
||||
selectBoxEl.keydown(e => {
|
||||
|
||||
Reference in New Issue
Block a user