double click can be also used to choose from recent notes

This commit is contained in:
azivner 2017-08-23 18:47:37 -04:00
parent afff834c55
commit 9d80f56d81

View file

@ -42,15 +42,23 @@ $(document).bind('keypress', 'alt+q', function() {
});
});
$('#recentNotesSelectBox').keydown(function(e) {
let key = e.which;
if (key === 13)// the enter key code
{
function setActiveNoteBasedOnRecentNotes() {
let noteId = $("#recentNotesSelectBox option:selected").val();
$("#tree").fancytree('getNodeByKey', noteId).setActive();
$("#recentNotesDialog").dialog('close');
}
$('#recentNotesSelectBox').keydown(function(e) {
let key = e.which;
if (key === 13)// the enter key code
{
setActiveNoteBasedOnRecentNotes();
}
});
$('#recentNotesSelectBox').dblclick(function(e) {
setActiveNoteBasedOnRecentNotes();
});