small fixes related to inherited attributes

This commit is contained in:
zadam 2020-08-11 22:52:17 +02:00
parent 8d0df6ddb9
commit 935e5de493
6 changed files with 30 additions and 9 deletions

12
package-lock.json generated
View File

@ -2762,9 +2762,9 @@
}
},
"dayjs": {
"version": "1.8.32",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.32.tgz",
"integrity": "sha512-V91aTRu5btP+uzGHaaOfodckEfBWhmi9foRP7cauAO1PTB8+tZ9o0Jec7q6TIIRY1N4q1IfiKsZunkB/AEWqMQ=="
"version": "1.8.33",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.33.tgz",
"integrity": "sha512-881TDLZCdpJFKbraWRHcUG8zfMLLX400ENf9rFZDuWc5zYMss6xifo2PhlDX0ftOmR2NRmaIY47bAa4gKQfXqw=="
},
"debug": {
"version": "4.1.1",
@ -3065,9 +3065,9 @@
}
},
"electron": {
"version": "10.0.0-beta.19",
"resolved": "https://registry.npmjs.org/electron/-/electron-10.0.0-beta.19.tgz",
"integrity": "sha512-UHpCyGfb+tkiJutNLNhH0qm2hELw8zY1g3+kpdH0OFPyMfzvJHQk6+mCz9VzWZNqGGnEpXryY5zQ0Ou/eoMH4A==",
"version": "10.0.0-beta.21",
"resolved": "https://registry.npmjs.org/electron/-/electron-10.0.0-beta.21.tgz",
"integrity": "sha512-r2qIQ9lzq2FBeEpitBWJ5WO0V+TtrEvrgAXc2sUCrZqKfS1kUoJadmrDy69j4R3qNfifRrxuR2wISMmvNL2SAQ==",
"dev": true,
"requires": {
"@electron/get": "^1.0.1",

View File

@ -31,7 +31,7 @@
"commonmark": "0.29.1",
"cookie-parser": "1.4.5",
"csurf": "1.11.0",
"dayjs": "1.8.32",
"dayjs": "1.8.33",
"debug": "4.1.1",
"ejs": "3.1.3",
"electron-debug": "3.1.0",
@ -76,7 +76,7 @@
},
"devDependencies": {
"cross-env": "7.0.2",
"electron": "10.0.0-beta.19",
"electron": "10.0.0-beta.21",
"electron-builder": "22.8.0",
"electron-packager": "15.0.0",
"electron-rebuild": "1.11.0",

View File

@ -26,6 +26,12 @@ function initAttributeNameAutocomplete({ $el, attributeType, open }) {
cb(result);
}
}]);
$el.on('autocomplete:opened', () => {
if ($el.attr("readonly")) {
$el.autocomplete('close');
}
});
}
if (open) {
@ -64,6 +70,12 @@ async function initLabelValueAutocomplete({ $el, open, nameCallback }) {
cb(filtered);
}
}]);
$el.on('autocomplete:opened', () => {
if ($el.attr("readonly")) {
$el.autocomplete('close');
}
})
}
if (open) {

View File

@ -102,6 +102,12 @@ function initNoteAutocomplete($el, options) {
}
});
$el.on('autocomplete:opened', () => {
if ($el.attr("readonly")) {
$el.autocomplete('close');
}
});
return $el;
}

View File

@ -295,12 +295,15 @@ export default class AttributeDetailWidget extends BasicWidget {
}
}
this.$saveAndCloseButton.toggle(!!isOwned);
if (isOwned) {
this.$attrIsOwnedBy.hide();
}
else {
this.$attrIsOwnedBy
.show()
.empty()
.append(attribute.type === 'label' ? 'Label' : 'Relation')
.append(' is owned by note ')
.append(await linkService.createNoteLink(attribute.noteId))

View File

@ -13,7 +13,7 @@ const TPL = `
margin-right: 7px;
}
.inherited-attributes {
.inherited-attributes-wrapper {
color: var(--muted-text-color);
max-height: 200px;
overflow: auto;