mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	Merge pull request #3816 from soulsands/fix-attr-ui
fix:don't break words for CJK text
This commit is contained in:
		
						commit
						b2ed5a01b3
					
				@ -29,6 +29,9 @@ const TPL = `
 | 
			
		||||
    .promoted-attribute-cell div.input-group {
 | 
			
		||||
        margin-left: 10px;
 | 
			
		||||
    }
 | 
			
		||||
    .promoted-attribute-cell strong {
 | 
			
		||||
        word-break:keep-all;
 | 
			
		||||
    }
 | 
			
		||||
    </style>
 | 
			
		||||
    
 | 
			
		||||
    <div class="promoted-attributes-container"></div>
 | 
			
		||||
@ -54,7 +57,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget {
 | 
			
		||||
        const promotedDefAttrs = note.getPromotedDefinitionAttributes();
 | 
			
		||||
 | 
			
		||||
        if (promotedDefAttrs.length === 0) {
 | 
			
		||||
            return { show: false };
 | 
			
		||||
            return {show: false};
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return {
 | 
			
		||||
@ -144,7 +147,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget {
 | 
			
		||||
                        return;
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    attributeValues = attributeValues.map(attribute => ({ value: attribute }));
 | 
			
		||||
                    attributeValues = attributeValues.map(attribute => ({value: attribute}));
 | 
			
		||||
 | 
			
		||||
                    $input.autocomplete({
 | 
			
		||||
                        appendTo: document.querySelector('body'),
 | 
			
		||||
@ -164,7 +167,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget {
 | 
			
		||||
                        }
 | 
			
		||||
                    }]);
 | 
			
		||||
 | 
			
		||||
                    $input.on('autocomplete:selected', e => this.promotedAttributeChanged(e))
 | 
			
		||||
                    $input.on('autocomplete:selected', e => this.promotedAttributeChanged(e));
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
            else if (definition.labelType === 'number') {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user