diff --git a/src/templates/app.html b/src/templates/app.html index 4993e0e69..88ae850c5 100644 --- a/src/templates/app.html +++ b/src/templates/app.html @@ -38,6 +38,10 @@ Collapse tree + + Collapse tree + +
diff --git a/static/icons/crosshair.png b/static/icons/crosshair.png new file mode 100644 index 000000000..bf1bce858 Binary files /dev/null and b/static/icons/crosshair.png differ diff --git a/static/js/encryption.js b/static/js/encryption.js index cbbe1b46d..1c6856b76 100644 --- a/static/js/encryption.js +++ b/static/js/encryption.js @@ -213,7 +213,7 @@ function decryptNoteAndSendToServer() { function decryptNoteIfNecessary(note) { if (note.detail.encryption > 0) { - return decryptNote(note); + decryptNote(note); } } diff --git a/static/js/tree.js b/static/js/tree.js index ffc6d5746..121aa893d 100644 --- a/static/js/tree.js +++ b/static/js/tree.js @@ -179,4 +179,14 @@ function collapseTree() { }); } +function scrollToCurrentNote() { + const node = getNodeByKey(globalCurrentNote.detail.note_id); + + if (node) { + node.makeVisible({scrollIntoView: true}); + + node.setFocus(); + } +} + $(document).bind('keydown', 'alt+c', collapseTree); \ No newline at end of file