mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	smaller fixes
This commit is contained in:
		
							parent
							
								
									48a7c0235f
								
							
						
					
					
						commit
						3f0974d3d2
					
				| @ -88,6 +88,12 @@ class AttributesWidget extends StandardWidget { | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     toggle(show) { | ||||
|         console.trace("attributes toggle", show); | ||||
| 
 | ||||
|         super.toggle(show); | ||||
|     } | ||||
| 
 | ||||
|     syncDataListener({data}) { | ||||
|         if (data.find(sd => sd.entityName === 'attributes' && sd.noteId === this.tabContext.note.noteId)) { | ||||
|             // no need to invalidate attributes since the Attribute class listens to this as well
 | ||||
|  | ||||
| @ -10,8 +10,6 @@ class BasicWidget extends Component { | ||||
|         $widget.find("[data-trigger-event]").on('click', e => { | ||||
|             const eventName = $(e.target).attr('data-trigger-event'); | ||||
| 
 | ||||
|             console.log("Triggering " + eventName); | ||||
| 
 | ||||
|             this.appContext.trigger(eventName); | ||||
|         }); | ||||
| 
 | ||||
|  | ||||
| @ -36,9 +36,10 @@ export default class NoteDetailWidget extends TabAwareWidget { | ||||
|         this.typeWidgetPromises = {}; | ||||
| 
 | ||||
|         this.spacedUpdate = new SpacedUpdate(async () => { | ||||
|             const {noteFull} = this.tabContext; | ||||
|             const {noteId} = this.tabContext.note; | ||||
|             const {noteFull, note} = this.tabContext; | ||||
|             const {noteId} = note; | ||||
| 
 | ||||
|             // FIXME hack
 | ||||
|             const dto = note.dto; | ||||
|             dto.content = noteFull.content = this.getTypeWidget().getContent(); | ||||
| 
 | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| import TabAwareWidget from "./tab_aware_widget.js"; | ||||
| 
 | ||||
| const TPL = ` | ||||
| <div> | ||||
| <div style="display: inline-flex;"> | ||||
|     <button class="btn btn-sm icon-button bx bx-play-circle render-button" | ||||
|             title="Render"></button> | ||||
|      | ||||
|  | ||||
| @ -79,19 +79,12 @@ class StandardWidget extends TabAwareWidget { | ||||
|         this.$headerActions = this.$widget.find('.widget-header-actions'); | ||||
|         this.$headerActions.append(...this.getHeaderActions()); | ||||
| 
 | ||||
|         // actual rendering is async
 | ||||
|         this.renderBody(); | ||||
|         this.initialized = this.renderBody(); | ||||
| 
 | ||||
|         return this.$widget; | ||||
|     } | ||||
| 
 | ||||
|     async renderBody() { | ||||
|         // if (!this.isExpanded() || this.rendered) {
 | ||||
|         //     return;
 | ||||
|         // }
 | ||||
|         //
 | ||||
|         // this.rendered = true;
 | ||||
| 
 | ||||
|         await this.doRenderBody(); | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -37,6 +37,10 @@ export default class TabCachingWidget extends TabAwareWidget { | ||||
|         } | ||||
| 
 | ||||
|         widget.toggle(true); | ||||
| 
 | ||||
|         // stop propagation of the event to the children, individual tab widget should not know about tab switching
 | ||||
|         // since they are per-tab
 | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|     tabRemovedListener({tabId}) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam