mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-01 13:31:32 +08:00 
			
		
		
		
	stop #workspaceTemplate from being inherited (should have the same special behavior as #template)
This commit is contained in:
		
							parent
							
								
									b816773d02
								
							
						
					
					
						commit
						05231bd1c2
					
				| @ -403,7 +403,7 @@ class Note extends AbstractEntity { | |||||||
|                         templateAttributes.push( |                         templateAttributes.push( | ||||||
|                             ...templateNote.__getAttributes(newPath) |                             ...templateNote.__getAttributes(newPath) | ||||||
|                                 // template attr is used as a marker for templates, but it's not meant to be inherited
 |                                 // template attr is used as a marker for templates, but it's not meant to be inherited
 | ||||||
|                                 .filter(attr => !(attr.type === 'label' && attr.name === 'template')) |                                 .filter(attr => !(attr.type === 'label' && (attr.name === 'template' || attr.name === 'workspacetemplate'))) | ||||||
|                         ); |                         ); | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|  | |||||||
| @ -267,7 +267,7 @@ class NoteShort { | |||||||
|                     attrArrs.push( |                     attrArrs.push( | ||||||
|                         templateNote.__getCachedAttributes(newPath) |                         templateNote.__getCachedAttributes(newPath) | ||||||
|                             // template attr is used as a marker for templates, but it's not meant to be inherited
 |                             // template attr is used as a marker for templates, but it's not meant to be inherited
 | ||||||
|                             .filter(attr => !(attr.type === 'label' && attr.name === 'template')) |                             .filter(attr => !(attr.type === 'label' && (attr.name === 'template' || attr.name === 'workspacetemplate'))) | ||||||
|                     ); |                     ); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  | |||||||
| @ -28,7 +28,7 @@ class AttributeExistsExp extends Expression { | |||||||
|             } |             } | ||||||
|             else if (note.isTemplate() && |             else if (note.isTemplate() && | ||||||
|                 // template attr is used as a marker for templates, but it's not meant to be inherited
 |                 // template attr is used as a marker for templates, but it's not meant to be inherited
 | ||||||
|                 !(this.attributeType === 'label' && this.attributeName === 'template')) { |                 !(this.attributeType === 'label' && (this.attributeName === 'template' || this.attributeName === 'workspacetemplate'))) { | ||||||
|                 resultNoteSet.addAll(note.getTemplatedNotes()); |                 resultNoteSet.addAll(note.getTemplatedNotes()); | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam