mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	hide note paths dropdown on changed note, #1572
This commit is contained in:
		
							parent
							
								
									9c2b98915e
								
							
						
					
					
						commit
						806ab22fa8
					
				| @ -59,6 +59,7 @@ export default class NotePathsWidget extends TabAwareWidget { | |||||||
| 
 | 
 | ||||||
|         this.$currentPath = this.$widget.find('.current-path'); |         this.$currentPath = this.$widget.find('.current-path'); | ||||||
|         this.$dropdown = this.$widget.find(".dropdown"); |         this.$dropdown = this.$widget.find(".dropdown"); | ||||||
|  |         this.$dropdownToggle = this.$widget.find('.dropdown-toggle'); | ||||||
| 
 | 
 | ||||||
|         this.$notePathList = this.$dropdown.find(".note-path-list"); |         this.$notePathList = this.$dropdown.find(".note-path-list"); | ||||||
| 
 | 
 | ||||||
| @ -100,6 +101,8 @@ export default class NotePathsWidget extends TabAwareWidget { | |||||||
| 
 | 
 | ||||||
|             parentNoteId = noteId; |             parentNoteId = noteId; | ||||||
|         } |         } | ||||||
|  | 
 | ||||||
|  |         this.$dropdownToggle.dropdown('hide'); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     async renderDropdown() { |     async renderDropdown() { | ||||||
| @ -141,20 +144,20 @@ export default class NotePathsWidget extends TabAwareWidget { | |||||||
|     async addPath(notePath, isCurrent) { |     async addPath(notePath, isCurrent) { | ||||||
|         const title = await treeService.getNotePathTitle(notePath); |         const title = await treeService.getNotePathTitle(notePath); | ||||||
| 
 | 
 | ||||||
|         const noteLink = await linkService.createNoteLink(notePath, {title}); |         const $noteLink = await linkService.createNoteLink(notePath, {title}); | ||||||
| 
 | 
 | ||||||
|         noteLink |         $noteLink | ||||||
|             .addClass("dropdown-item"); |             .addClass("dropdown-item"); | ||||||
| 
 | 
 | ||||||
|         noteLink |         $noteLink | ||||||
|             .find('a') |             .find('a') | ||||||
|             .addClass("no-tooltip-preview"); |             .addClass("no-tooltip-preview"); | ||||||
| 
 | 
 | ||||||
|         if (isCurrent) { |         if (isCurrent) { | ||||||
|             noteLink.addClass("current"); |             $noteLink.addClass("current"); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         this.$notePathList.append(noteLink); |         this.$notePathList.append($noteLink); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     entitiesReloadedEvent({loadResults}) { |     entitiesReloadedEvent({loadResults}) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam