mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	other fixes
This commit is contained in:
		
							parent
							
								
									c1ce578018
								
							
						
					
					
						commit
						58ee801e57
					
				| @ -97,7 +97,7 @@ const TPL = ` | ||||
|         <tr class="attr-row-promoted" | ||||
|             title="${t('attribute_detail.promoted_title')}"> | ||||
|             <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 class="attr-row-promoted-alias"> | ||||
|             <th title="${t('attribute_detail.promoted_alias_title')}">${t('attribute_detail.promoted_alias')}</th> | ||||
| @ -134,9 +134,7 @@ const TPL = ` | ||||
|             <td> | ||||
|                 <div class="input-group"> | ||||
|                     <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> | ||||
|                     </div> | ||||
|                     <span class="input-group-text">${t('attribute_detail.digits')}</span> | ||||
|                 </div> | ||||
|             </td> | ||||
|         </tr> | ||||
| @ -150,7 +148,7 @@ const TPL = ` | ||||
|         </tr> | ||||
|         <tr title="${t('attribute_detail.inheritable_title')}"> | ||||
|             <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> | ||||
|     </table> | ||||
| 
 | ||||
| @ -349,7 +347,7 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget { | ||||
|         this.$rowTargetNote = this.$widget.find('.attr-row-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) => { | ||||
|                 if (!suggestion.notePath) { | ||||
|                     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) { | ||||
|             this.hide(); | ||||
| 
 | ||||
| @ -545,7 +543,7 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget { | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         return {left, right}; | ||||
|         return { left, right }; | ||||
|     } | ||||
| 
 | ||||
|     async saveAndClose() { | ||||
| @ -589,19 +587,19 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget { | ||||
|     } | ||||
| 
 | ||||
|     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) { | ||||
|             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) { | ||||
|             this.$relatedNotesContainer.hide(); | ||||
|         } else { | ||||
|             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(); | ||||
| 
 | ||||
| @ -611,7 +609,7 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget { | ||||
| 
 | ||||
|             for (const note of displayedNotes) { | ||||
|                 const notePath = note.getBestNotePathString(hoistedNoteId); | ||||
|                 const $noteLink = await linkService.createLink(notePath, {showNotePath: true}); | ||||
|                 const $noteLink = await linkService.createLink(notePath, { showNotePath: true }); | ||||
| 
 | ||||
|                 this.$relatedNotesList.append( | ||||
|                     $("<li>").append($noteLink) | ||||
| @ -619,7 +617,7 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget { | ||||
|             } | ||||
| 
 | ||||
|             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 { | ||||
|                 this.$relatedNotesMoreNotes.hide(); | ||||
|             } | ||||
|  | ||||
| @ -47,24 +47,18 @@ const TPL = ` | ||||
|     <div class="find-widget-box"> | ||||
|         <div class="input-group find-widget-search-term-input-group"> | ||||
|             <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-down find-widget-next-button" type="button"></button> | ||||
|             </div> | ||||
|             <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> | ||||
|         </div> | ||||
|          | ||||
|         <div class="form-check"> | ||||
|             <label tabIndex="-1" class="form-check-label"> | ||||
|                 <input type="checkbox" class="form-check-input find-widget-case-sensitive-checkbox">  | ||||
|                 case sensitive | ||||
|             </label> | ||||
|             <input type="checkbox" class="form-check-input find-widget-case-sensitive-checkbox">  | ||||
|             <label tabIndex="-1" class="form-check-label">case sensitive</label> | ||||
|         </div> | ||||
| 
 | ||||
|         <div class="form-check"> | ||||
|             <label tabIndex="-1" class="form-check-label"> | ||||
|                 <input type="checkbox" class="form-check-input find-widget-match-words-checkbox">  | ||||
|                 match words | ||||
|             </label> | ||||
|             <input type="checkbox" class="form-check-input find-widget-match-words-checkbox"> | ||||
|             <label tabIndex="-1" class="form-check-label">match words</label> | ||||
|         </div> | ||||
|          | ||||
|         <div class="find-widget-found-wrapper"> | ||||
|  | ||||
| @ -71,7 +71,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { | ||||
|         const promotedDefAttrs = note.getPromotedDefinitionAttributes(); | ||||
| 
 | ||||
|         if (promotedDefAttrs.length === 0) { | ||||
|             return {show: false}; | ||||
|             return { show: false }; | ||||
|         } | ||||
| 
 | ||||
|         return { | ||||
| @ -167,7 +167,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'), | ||||
| @ -229,9 +229,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { | ||||
|                     .prop("title", t("promoted_attributes.open_external_link")) | ||||
|                     .on('click', () => window.open($input.val(), '_blank')); | ||||
| 
 | ||||
|                 $input.after($("<div>") | ||||
|                     .addClass("input-group-append") | ||||
|                     .append($openButton)); | ||||
|                 $input.after($openButton); | ||||
|             } | ||||
|             else { | ||||
|                 ws.logError(t("promoted_attributes.unknown_label_type", { type: definitionAttr.labelType })); | ||||
| @ -244,7 +242,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { | ||||
| 
 | ||||
|             if (utils.isDesktop()) { | ||||
|                 // no need to wait for this
 | ||||
|                 noteAutocompleteService.initNoteAutocomplete($input, {allowCreatingNotes: true}); | ||||
|                 noteAutocompleteService.initNoteAutocomplete($input, { allowCreatingNotes: true }); | ||||
| 
 | ||||
|                 $input.on('autocomplete:noteselected', (event, suggestion, dataset) => { | ||||
|                     this.promotedAttributeChanged(event); | ||||
| @ -257,7 +255,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { | ||||
|             } | ||||
|         } | ||||
|         else { | ||||
|             ws.logError(t(`promoted_attributes.unknown_attribute_type`, {type: valueAttr.type})); | ||||
|             ws.logError(t(`promoted_attributes.unknown_attribute_type`, { type: valueAttr.type })); | ||||
|             return; | ||||
|         } | ||||
| 
 | ||||
| @ -346,7 +344,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { | ||||
|         this.$widget.find(".promoted-attribute-input:first").focus(); | ||||
|     } | ||||
| 
 | ||||
|     entitiesReloadedEvent({loadResults}) { | ||||
|     entitiesReloadedEvent({ loadResults }) { | ||||
|         if (loadResults.getAttributeRows(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) { | ||||
|             this.refresh(); | ||||
|         } | ||||
|  | ||||
| @ -45,9 +45,7 @@ const TPL = ` | ||||
| 
 | ||||
|             <div class="input-group"> | ||||
|                 <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> | ||||
|                 </div> | ||||
|                 <span class="input-group-text">%</span> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
| @ -65,9 +63,7 @@ const TPL = ` | ||||
| 
 | ||||
|             <div class="input-group"> | ||||
|                 <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> | ||||
|                 </div> | ||||
|                 <span class="input-group-text">%</span> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
| @ -85,9 +81,7 @@ const TPL = ` | ||||
| 
 | ||||
|             <div class="input-group"> | ||||
|                 <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> | ||||
|                 </div> | ||||
|                 <span class="input-group-text">%</span> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
| @ -105,9 +99,7 @@ const TPL = ` | ||||
| 
 | ||||
|             <div class="input-group"> | ||||
|                 <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> | ||||
|                 </div> | ||||
|                 <span class="input-group-text">%</span> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
|  | ||||
| @ -15,7 +15,9 @@ const TPL = ` | ||||
|          | ||||
|         <div class="col-6"> | ||||
|             <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>`; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jin
						Jin