mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	double click can be also used to choose from recent notes
This commit is contained in:
		
							parent
							
								
									afff834c55
								
							
						
					
					
						commit
						9d80f56d81
					
				| @ -42,15 +42,23 @@ $(document).bind('keypress', 'alt+q', function() { | ||||
|     }); | ||||
| }); | ||||
| 
 | ||||
| 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
 | ||||
|     { | ||||
|         let noteId = $("#recentNotesSelectBox option:selected").val(); | ||||
| 
 | ||||
|         $("#tree").fancytree('getNodeByKey', noteId).setActive(); | ||||
| 
 | ||||
|         $("#recentNotesDialog").dialog('close'); | ||||
|         setActiveNoteBasedOnRecentNotes(); | ||||
|     } | ||||
| }); | ||||
| 
 | ||||
| $('#recentNotesSelectBox').dblclick(function(e) { | ||||
|     setActiveNoteBasedOnRecentNotes(); | ||||
| }); | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 azivner
						azivner