mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	small fixes related to inherited attributes
This commit is contained in:
		
							
								
								
									
										12
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										12
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@@ -2762,9 +2762,9 @@
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "dayjs": {
 | 
					    "dayjs": {
 | 
				
			||||||
      "version": "1.8.32",
 | 
					      "version": "1.8.33",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.32.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.33.tgz",
 | 
				
			||||||
      "integrity": "sha512-V91aTRu5btP+uzGHaaOfodckEfBWhmi9foRP7cauAO1PTB8+tZ9o0Jec7q6TIIRY1N4q1IfiKsZunkB/AEWqMQ=="
 | 
					      "integrity": "sha512-881TDLZCdpJFKbraWRHcUG8zfMLLX400ENf9rFZDuWc5zYMss6xifo2PhlDX0ftOmR2NRmaIY47bAa4gKQfXqw=="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "debug": {
 | 
					    "debug": {
 | 
				
			||||||
      "version": "4.1.1",
 | 
					      "version": "4.1.1",
 | 
				
			||||||
@@ -3065,9 +3065,9 @@
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "electron": {
 | 
					    "electron": {
 | 
				
			||||||
      "version": "10.0.0-beta.19",
 | 
					      "version": "10.0.0-beta.21",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/electron/-/electron-10.0.0-beta.19.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/electron/-/electron-10.0.0-beta.21.tgz",
 | 
				
			||||||
      "integrity": "sha512-UHpCyGfb+tkiJutNLNhH0qm2hELw8zY1g3+kpdH0OFPyMfzvJHQk6+mCz9VzWZNqGGnEpXryY5zQ0Ou/eoMH4A==",
 | 
					      "integrity": "sha512-r2qIQ9lzq2FBeEpitBWJ5WO0V+TtrEvrgAXc2sUCrZqKfS1kUoJadmrDy69j4R3qNfifRrxuR2wISMmvNL2SAQ==",
 | 
				
			||||||
      "dev": true,
 | 
					      "dev": true,
 | 
				
			||||||
      "requires": {
 | 
					      "requires": {
 | 
				
			||||||
        "@electron/get": "^1.0.1",
 | 
					        "@electron/get": "^1.0.1",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -31,7 +31,7 @@
 | 
				
			|||||||
    "commonmark": "0.29.1",
 | 
					    "commonmark": "0.29.1",
 | 
				
			||||||
    "cookie-parser": "1.4.5",
 | 
					    "cookie-parser": "1.4.5",
 | 
				
			||||||
    "csurf": "1.11.0",
 | 
					    "csurf": "1.11.0",
 | 
				
			||||||
    "dayjs": "1.8.32",
 | 
					    "dayjs": "1.8.33",
 | 
				
			||||||
    "debug": "4.1.1",
 | 
					    "debug": "4.1.1",
 | 
				
			||||||
    "ejs": "3.1.3",
 | 
					    "ejs": "3.1.3",
 | 
				
			||||||
    "electron-debug": "3.1.0",
 | 
					    "electron-debug": "3.1.0",
 | 
				
			||||||
@@ -76,7 +76,7 @@
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
    "cross-env": "7.0.2",
 | 
					    "cross-env": "7.0.2",
 | 
				
			||||||
    "electron": "10.0.0-beta.19",
 | 
					    "electron": "10.0.0-beta.21",
 | 
				
			||||||
    "electron-builder": "22.8.0",
 | 
					    "electron-builder": "22.8.0",
 | 
				
			||||||
    "electron-packager": "15.0.0",
 | 
					    "electron-packager": "15.0.0",
 | 
				
			||||||
    "electron-rebuild": "1.11.0",
 | 
					    "electron-rebuild": "1.11.0",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -26,6 +26,12 @@ function initAttributeNameAutocomplete({ $el, attributeType, open }) {
 | 
				
			|||||||
                cb(result);
 | 
					                cb(result);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }]);
 | 
					        }]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        $el.on('autocomplete:opened', () => {
 | 
				
			||||||
 | 
					            if ($el.attr("readonly")) {
 | 
				
			||||||
 | 
					                $el.autocomplete('close');
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (open) {
 | 
					    if (open) {
 | 
				
			||||||
@@ -64,6 +70,12 @@ async function initLabelValueAutocomplete({ $el, open, nameCallback }) {
 | 
				
			|||||||
                cb(filtered);
 | 
					                cb(filtered);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }]);
 | 
					        }]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        $el.on('autocomplete:opened', () => {
 | 
				
			||||||
 | 
					            if ($el.attr("readonly")) {
 | 
				
			||||||
 | 
					                $el.autocomplete('close');
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (open) {
 | 
					    if (open) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -102,6 +102,12 @@ function initNoteAutocomplete($el, options) {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    $el.on('autocomplete:opened', () => {
 | 
				
			||||||
 | 
					        if ($el.attr("readonly")) {
 | 
				
			||||||
 | 
					            $el.autocomplete('close');
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return $el;
 | 
					    return $el;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -295,12 +295,15 @@ export default class AttributeDetailWidget extends BasicWidget {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this.$saveAndCloseButton.toggle(!!isOwned);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (isOwned) {
 | 
					        if (isOwned) {
 | 
				
			||||||
            this.$attrIsOwnedBy.hide();
 | 
					            this.$attrIsOwnedBy.hide();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else {
 | 
					        else {
 | 
				
			||||||
            this.$attrIsOwnedBy
 | 
					            this.$attrIsOwnedBy
 | 
				
			||||||
                .show()
 | 
					                .show()
 | 
				
			||||||
 | 
					                .empty()
 | 
				
			||||||
                .append(attribute.type === 'label' ? 'Label' : 'Relation')
 | 
					                .append(attribute.type === 'label' ? 'Label' : 'Relation')
 | 
				
			||||||
                .append(' is owned by note ')
 | 
					                .append(' is owned by note ')
 | 
				
			||||||
                .append(await linkService.createNoteLink(attribute.noteId))
 | 
					                .append(await linkService.createNoteLink(attribute.noteId))
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,7 @@ const TPL = `
 | 
				
			|||||||
            margin-right: 7px;
 | 
					            margin-right: 7px;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        .inherited-attributes {
 | 
					        .inherited-attributes-wrapper {
 | 
				
			||||||
            color: var(--muted-text-color);
 | 
					            color: var(--muted-text-color);
 | 
				
			||||||
            max-height: 200px;
 | 
					            max-height: 200px;
 | 
				
			||||||
            overflow: auto;
 | 
					            overflow: auto;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user