some refactorings of note detail service

This commit is contained in:
azivner
2018-03-26 23:48:45 -04:00
parent 9c1b8da573
commit 7e856283ee
7 changed files with 103 additions and 89 deletions

View File

@@ -84,18 +84,21 @@ function registerEntrypoints() {
}
});
// FIXME: do we really need these at this point?
utils.bindShortcut("ctrl+shift+up", () => {
const node = treeService.getCurrentNode();
node.navigate($.ui.keyCode.UP, true);
$("#note-detail").focus();
$("#note-detail-text").focus();
});
// FIXME: do we really need these at this point?
utils.bindShortcut("ctrl+shift+down", () => {
const node = treeService.getCurrentNode();
node.navigate($.ui.keyCode.DOWN, true);
$("#note-detail").focus();
$("#note-detail-text").focus();
});
$(document).bind('keydown', 'ctrl+-', () => {
@@ -120,7 +123,7 @@ function registerEntrypoints() {
}
});
$("#note-title").bind('keydown', 'return', () => $("#note-detail").focus());
$("#note-title").bind('keydown', 'return', () => $("#note-detail-text").focus());
$("#upload-attachment-button").click(attachmentService.uploadAttachment);
}