mirror of
https://github.com/zadam/trilium.git
synced 2025-11-04 20:36:13 +01:00
fix creating new promoted attributes, closes #1008
(cherry picked from commit 2e0fb8aaf1)
This commit is contained in:
@@ -19,6 +19,7 @@ const TPL = `
|
||||
|
||||
.promoted-attributes td, .promoted-attributes th {
|
||||
padding: 5px;
|
||||
min-width: 50px; /* otherwise checkboxes can collapse into 0 width (if there are only checkboxes) */
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -98,7 +99,7 @@ export default class PromotedAttributesWidget extends TabAwareWidget {
|
||||
const $labelCell = $("<th>").append(valueAttr.name);
|
||||
const $input = $("<input>")
|
||||
.prop("tabindex", definitionAttr.position)
|
||||
.prop("attribute-id", valueAttr.isOwned ? valueAttr.attributeId : '') // if not owned, we'll force creation of a new attribute instead of updating the inherited one
|
||||
.prop("attribute-id", valueAttr.noteId === this.noteId ? valueAttr.attributeId : '') // if not owned, we'll force creation of a new attribute instead of updating the inherited one
|
||||
.prop("attribute-type", valueAttr.type)
|
||||
.prop("attribute-name", valueAttr.name)
|
||||
.prop("value", valueAttr.value)
|
||||
@@ -266,4 +267,4 @@ export default class PromotedAttributesWidget extends TabAwareWidget {
|
||||
|
||||
$attr.prop("attribute-id", result.attributeId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user