added note alphabetical sorting to context menu

This commit is contained in:
azivner
2018-01-13 17:00:40 -05:00
parent a375c55371
commit 4f649c2e21
3 changed files with 47 additions and 2 deletions

View File

@@ -769,6 +769,12 @@ const noteTree = (function() {
showMessage("Created!");
}
async function sortAlphabetically(noteId) {
await server.put('notes/' + noteId + '/sort');
await reload();
}
$(document).bind('keydown', 'ctrl+o', e => {
console.log("pressed O");
@@ -842,6 +848,7 @@ const noteTree = (function() {
getNotePathTitle,
removeParentChildRelation,
setParentChildRelation,
getSelectedNodes
getSelectedNodes,
sortAlphabetically
};
})();