mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 19:49:01 +01:00 
			
		
		
		
	other fixes
This commit is contained in:
		
							parent
							
								
									c1ce578018
								
							
						
					
					
						commit
						58ee801e57
					
				| @ -97,7 +97,7 @@ const TPL = ` | |||||||
|         <tr class="attr-row-promoted" |         <tr class="attr-row-promoted" | ||||||
|             title="${t('attribute_detail.promoted_title')}"> |             title="${t('attribute_detail.promoted_title')}"> | ||||||
|             <th>${t('attribute_detail.promoted')}</th> |             <th>${t('attribute_detail.promoted')}</th> | ||||||
|             <td><input type="checkbox" class="attr-input-promoted form-control form-control-sm" /></td> |             <td><input type="checkbox" class="attr-input-promoted form-check" /></td> | ||||||
|         </tr> |         </tr> | ||||||
|         <tr class="attr-row-promoted-alias"> |         <tr class="attr-row-promoted-alias"> | ||||||
|             <th title="${t('attribute_detail.promoted_alias_title')}">${t('attribute_detail.promoted_alias')}</th> |             <th title="${t('attribute_detail.promoted_alias_title')}">${t('attribute_detail.promoted_alias')}</th> | ||||||
| @ -134,9 +134,7 @@ const TPL = ` | |||||||
|             <td> |             <td> | ||||||
|                 <div class="input-group"> |                 <div class="input-group"> | ||||||
|                     <input type="number" class="form-control attr-input-number-precision" style="text-align: right"> |                     <input type="number" class="form-control attr-input-number-precision" style="text-align: right"> | ||||||
|                     <div class="input-group-append"> |                     <span class="input-group-text">${t('attribute_detail.digits')}</span> | ||||||
|                         <span class="input-group-text">${t('attribute_detail.digits')}</span> |  | ||||||
|                     </div> |  | ||||||
|                 </div> |                 </div> | ||||||
|             </td> |             </td> | ||||||
|         </tr> |         </tr> | ||||||
| @ -150,7 +148,7 @@ const TPL = ` | |||||||
|         </tr> |         </tr> | ||||||
|         <tr title="${t('attribute_detail.inheritable_title')}"> |         <tr title="${t('attribute_detail.inheritable_title')}"> | ||||||
|             <th>${t('attribute_detail.inheritable')}</th> |             <th>${t('attribute_detail.inheritable')}</th> | ||||||
|             <td><input type="checkbox" class="attr-input-inheritable form-control form-control-sm" /></td> |             <td><input type="checkbox" class="attr-input-inheritable form-check" /></td> | ||||||
|         </tr> |         </tr> | ||||||
|     </table> |     </table> | ||||||
| 
 | 
 | ||||||
| @ -349,7 +347,7 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget { | |||||||
|         this.$rowTargetNote = this.$widget.find('.attr-row-target-note'); |         this.$rowTargetNote = this.$widget.find('.attr-row-target-note'); | ||||||
|         this.$inputTargetNote = this.$widget.find('.attr-input-target-note'); |         this.$inputTargetNote = this.$widget.find('.attr-input-target-note'); | ||||||
| 
 | 
 | ||||||
|         noteAutocompleteService.initNoteAutocomplete(this.$inputTargetNote, {allowCreatingNotes: true}) |         noteAutocompleteService.initNoteAutocomplete(this.$inputTargetNote, { allowCreatingNotes: true }) | ||||||
|             .on('autocomplete:noteselected', (event, suggestion, dataset) => { |             .on('autocomplete:noteselected', (event, suggestion, dataset) => { | ||||||
|                 if (!suggestion.notePath) { |                 if (!suggestion.notePath) { | ||||||
|                     return false; |                     return false; | ||||||
| @ -403,7 +401,7 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget { | |||||||
|         }); |         }); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     async showAttributeDetail({allAttributes, attribute, isOwned, x, y, focus}) { |     async showAttributeDetail({ allAttributes, attribute, isOwned, x, y, focus }) { | ||||||
|         if (!attribute) { |         if (!attribute) { | ||||||
|             this.hide(); |             this.hide(); | ||||||
| 
 | 
 | ||||||
| @ -545,7 +543,7 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget { | |||||||
|             } |             } | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         return {left, right}; |         return { left, right }; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     async saveAndClose() { |     async saveAndClose() { | ||||||
| @ -589,19 +587,19 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     async updateRelatedNotes() { |     async updateRelatedNotes() { | ||||||
|         let {results, count} = await server.post('search-related', this.attribute); |         let { results, count } = await server.post('search-related', this.attribute); | ||||||
| 
 | 
 | ||||||
|         for (const res of results) { |         for (const res of results) { | ||||||
|             res.noteId = res.notePathArray[res.notePathArray.length - 1]; |             res.noteId = res.notePathArray[res.notePathArray.length - 1]; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         results = results.filter(({noteId}) => noteId !== this.noteId); |         results = results.filter(({ noteId }) => noteId !== this.noteId); | ||||||
| 
 | 
 | ||||||
|         if (results.length === 0) { |         if (results.length === 0) { | ||||||
|             this.$relatedNotesContainer.hide(); |             this.$relatedNotesContainer.hide(); | ||||||
|         } else { |         } else { | ||||||
|             this.$relatedNotesContainer.show(); |             this.$relatedNotesContainer.show(); | ||||||
|             this.$relatedNotesTitle.text(t("attribute_detail.other_notes_with_name", {attributeType: this.attribute.type, attributeName: this.attribute.name})); |             this.$relatedNotesTitle.text(t("attribute_detail.other_notes_with_name", { attributeType: this.attribute.type, attributeName: this.attribute.name })); | ||||||
| 
 | 
 | ||||||
|             this.$relatedNotesList.empty(); |             this.$relatedNotesList.empty(); | ||||||
| 
 | 
 | ||||||
| @ -611,7 +609,7 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget { | |||||||
| 
 | 
 | ||||||
|             for (const note of displayedNotes) { |             for (const note of displayedNotes) { | ||||||
|                 const notePath = note.getBestNotePathString(hoistedNoteId); |                 const notePath = note.getBestNotePathString(hoistedNoteId); | ||||||
|                 const $noteLink = await linkService.createLink(notePath, {showNotePath: true}); |                 const $noteLink = await linkService.createLink(notePath, { showNotePath: true }); | ||||||
| 
 | 
 | ||||||
|                 this.$relatedNotesList.append( |                 this.$relatedNotesList.append( | ||||||
|                     $("<li>").append($noteLink) |                     $("<li>").append($noteLink) | ||||||
| @ -619,7 +617,7 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget { | |||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             if (results.length > DISPLAYED_NOTES) { |             if (results.length > DISPLAYED_NOTES) { | ||||||
|                 this.$relatedNotesMoreNotes.show().text(t("attribute_detail.and_more", {count: count - DISPLAYED_NOTES})); |                 this.$relatedNotesMoreNotes.show().text(t("attribute_detail.and_more", { count: count - DISPLAYED_NOTES })); | ||||||
|             } else { |             } else { | ||||||
|                 this.$relatedNotesMoreNotes.hide(); |                 this.$relatedNotesMoreNotes.hide(); | ||||||
|             } |             } | ||||||
|  | |||||||
| @ -47,24 +47,18 @@ const TPL = ` | |||||||
|     <div class="find-widget-box"> |     <div class="find-widget-box"> | ||||||
|         <div class="input-group find-widget-search-term-input-group"> |         <div class="input-group find-widget-search-term-input-group"> | ||||||
|             <input type="text" class="form-control find-widget-search-term-input"> |             <input type="text" class="form-control find-widget-search-term-input"> | ||||||
|             <div class="input-group-append"> |             <button class="btn btn-outline-secondary bx bxs-chevron-up find-widget-previous-button" type="button"></button> | ||||||
|                 <button class="btn btn-outline-secondary bx bxs-chevron-up find-widget-previous-button" type="button"></button> |             <button class="btn btn-outline-secondary bx bxs-chevron-down find-widget-next-button" type="button"></button> | ||||||
|                 <button class="btn btn-outline-secondary bx bxs-chevron-down find-widget-next-button" type="button"></button> |  | ||||||
|             </div> |  | ||||||
|         </div> |         </div> | ||||||
|          |          | ||||||
|         <div class="form-check"> |         <div class="form-check"> | ||||||
|             <label tabIndex="-1" class="form-check-label"> |             <input type="checkbox" class="form-check-input find-widget-case-sensitive-checkbox">  | ||||||
|                 <input type="checkbox" class="form-check-input find-widget-case-sensitive-checkbox">  |             <label tabIndex="-1" class="form-check-label">case sensitive</label> | ||||||
|                 case sensitive |  | ||||||
|             </label> |  | ||||||
|         </div> |         </div> | ||||||
| 
 | 
 | ||||||
|         <div class="form-check"> |         <div class="form-check"> | ||||||
|             <label tabIndex="-1" class="form-check-label"> |             <input type="checkbox" class="form-check-input find-widget-match-words-checkbox"> | ||||||
|                 <input type="checkbox" class="form-check-input find-widget-match-words-checkbox">  |             <label tabIndex="-1" class="form-check-label">match words</label> | ||||||
|                 match words |  | ||||||
|             </label> |  | ||||||
|         </div> |         </div> | ||||||
|          |          | ||||||
|         <div class="find-widget-found-wrapper"> |         <div class="find-widget-found-wrapper"> | ||||||
|  | |||||||
| @ -71,7 +71,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { | |||||||
|         const promotedDefAttrs = note.getPromotedDefinitionAttributes(); |         const promotedDefAttrs = note.getPromotedDefinitionAttributes(); | ||||||
| 
 | 
 | ||||||
|         if (promotedDefAttrs.length === 0) { |         if (promotedDefAttrs.length === 0) { | ||||||
|             return {show: false}; |             return { show: false }; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         return { |         return { | ||||||
| @ -167,7 +167,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { | |||||||
|                             return; |                             return; | ||||||
|                         } |                         } | ||||||
| 
 | 
 | ||||||
|                         attributeValues = attributeValues.map(attribute => ({value: attribute})); |                         attributeValues = attributeValues.map(attribute => ({ value: attribute })); | ||||||
| 
 | 
 | ||||||
|                         $input.autocomplete({ |                         $input.autocomplete({ | ||||||
|                             appendTo: document.querySelector('body'), |                             appendTo: document.querySelector('body'), | ||||||
| @ -229,9 +229,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { | |||||||
|                     .prop("title", t("promoted_attributes.open_external_link")) |                     .prop("title", t("promoted_attributes.open_external_link")) | ||||||
|                     .on('click', () => window.open($input.val(), '_blank')); |                     .on('click', () => window.open($input.val(), '_blank')); | ||||||
| 
 | 
 | ||||||
|                 $input.after($("<div>") |                 $input.after($openButton); | ||||||
|                     .addClass("input-group-append") |  | ||||||
|                     .append($openButton)); |  | ||||||
|             } |             } | ||||||
|             else { |             else { | ||||||
|                 ws.logError(t("promoted_attributes.unknown_label_type", { type: definitionAttr.labelType })); |                 ws.logError(t("promoted_attributes.unknown_label_type", { type: definitionAttr.labelType })); | ||||||
| @ -244,7 +242,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { | |||||||
| 
 | 
 | ||||||
|             if (utils.isDesktop()) { |             if (utils.isDesktop()) { | ||||||
|                 // no need to wait for this
 |                 // no need to wait for this
 | ||||||
|                 noteAutocompleteService.initNoteAutocomplete($input, {allowCreatingNotes: true}); |                 noteAutocompleteService.initNoteAutocomplete($input, { allowCreatingNotes: true }); | ||||||
| 
 | 
 | ||||||
|                 $input.on('autocomplete:noteselected', (event, suggestion, dataset) => { |                 $input.on('autocomplete:noteselected', (event, suggestion, dataset) => { | ||||||
|                     this.promotedAttributeChanged(event); |                     this.promotedAttributeChanged(event); | ||||||
| @ -257,7 +255,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { | |||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         else { |         else { | ||||||
|             ws.logError(t(`promoted_attributes.unknown_attribute_type`, {type: valueAttr.type})); |             ws.logError(t(`promoted_attributes.unknown_attribute_type`, { type: valueAttr.type })); | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
| @ -346,7 +344,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { | |||||||
|         this.$widget.find(".promoted-attribute-input:first").focus(); |         this.$widget.find(".promoted-attribute-input:first").focus(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     entitiesReloadedEvent({loadResults}) { |     entitiesReloadedEvent({ loadResults }) { | ||||||
|         if (loadResults.getAttributeRows(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) { |         if (loadResults.getAttributeRows(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) { | ||||||
|             this.refresh(); |             this.refresh(); | ||||||
|         } |         } | ||||||
|  | |||||||
| @ -45,9 +45,7 @@ const TPL = ` | |||||||
| 
 | 
 | ||||||
|             <div class="input-group"> |             <div class="input-group"> | ||||||
|                 <input type="number" class="main-font-size form-control options-number-input" min="50" max="200" step="10"/> |                 <input type="number" class="main-font-size form-control options-number-input" min="50" max="200" step="10"/> | ||||||
|                 <div class="input-group-append"> |                 <span class="input-group-text">%</span> | ||||||
|                     <span class="input-group-text">%</span> |  | ||||||
|                 </div> |  | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
| @ -65,9 +63,7 @@ const TPL = ` | |||||||
| 
 | 
 | ||||||
|             <div class="input-group"> |             <div class="input-group"> | ||||||
|                 <input type="number" class="tree-font-size form-control options-number-input" min="50" max="200" step="10"/> |                 <input type="number" class="tree-font-size form-control options-number-input" min="50" max="200" step="10"/> | ||||||
|                 <div class="input-group-append"> |                 <span class="input-group-text">%</span> | ||||||
|                     <span class="input-group-text">%</span> |  | ||||||
|                 </div> |  | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
| @ -85,9 +81,7 @@ const TPL = ` | |||||||
| 
 | 
 | ||||||
|             <div class="input-group"> |             <div class="input-group"> | ||||||
|                 <input type="number" class="detail-font-size form-control options-number-input" min="50" max="200" step="10"/> |                 <input type="number" class="detail-font-size form-control options-number-input" min="50" max="200" step="10"/> | ||||||
|                 <div class="input-group-append"> |                 <span class="input-group-text">%</span> | ||||||
|                     <span class="input-group-text">%</span> |  | ||||||
|                 </div> |  | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
| @ -105,9 +99,7 @@ const TPL = ` | |||||||
| 
 | 
 | ||||||
|             <div class="input-group"> |             <div class="input-group"> | ||||||
|                 <input type="number" class="monospace-font-size form-control options-number-input" min="50" max="200" step="10"/> |                 <input type="number" class="monospace-font-size form-control options-number-input" min="50" max="200" step="10"/> | ||||||
|                 <div class="input-group-append"> |                 <span class="input-group-text">%</span> | ||||||
|                     <span class="input-group-text">%</span> |  | ||||||
|                 </div> |  | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
|  | |||||||
| @ -15,7 +15,9 @@ const TPL = ` | |||||||
|          |          | ||||||
|         <div class="col-6"> |         <div class="col-6"> | ||||||
|             <label>${t("theme.override_theme_fonts_label")}</label> |             <label>${t("theme.override_theme_fonts_label")}</label> | ||||||
|             <input type="checkbox" class="override-theme-fonts form-control"> |             <div class="form-check"> | ||||||
|  |                 <input type="checkbox" class="override-theme-fonts form-check-input"> | ||||||
|  |             </div> | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
| </div>`; | </div>`; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jin
						Jin