mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	double click can be also used to choose from recent notes
This commit is contained in:
		@@ -42,15 +42,23 @@ $(document).bind('keypress', 'alt+q', function() {
 | 
				
			|||||||
    });
 | 
					    });
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$('#recentNotesSelectBox').keydown(function(e) {
 | 
					function setActiveNoteBasedOnRecentNotes() {
 | 
				
			||||||
    let key = e.which;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (key === 13)// the enter key code
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
    let noteId = $("#recentNotesSelectBox option:selected").val();
 | 
					    let noteId = $("#recentNotesSelectBox option:selected").val();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    $("#tree").fancytree('getNodeByKey', noteId).setActive();
 | 
					    $("#tree").fancytree('getNodeByKey', noteId).setActive();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    $("#recentNotesDialog").dialog('close');
 | 
					    $("#recentNotesDialog").dialog('close');
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$('#recentNotesSelectBox').keydown(function(e) {
 | 
				
			||||||
 | 
					    let key = e.which;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (key === 13)// the enter key code
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        setActiveNoteBasedOnRecentNotes();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$('#recentNotesSelectBox').dblclick(function(e) {
 | 
				
			||||||
 | 
					    setActiveNoteBasedOnRecentNotes();
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
		Reference in New Issue
	
	Block a user