* refactoring of repository layer to represent booleans as true/false instead of 1/0

* show list of inherited attributes, fixes #136
* properly work with inheritance
This commit is contained in:
azivner
2018-08-07 11:38:00 +02:00
parent d3e44b37e9
commit 5f36856571
14 changed files with 127 additions and 45 deletions

View File

@@ -228,6 +228,7 @@ async function showChildrenOverview(hideChildrenOverview) {
async function loadAttributes() {
$promotedAttributesContainer.empty();
$attributeList.hide();
const noteId = getCurrentNoteId();
@@ -244,7 +245,7 @@ async function loadAttributes() {
const $labelCell = $("<th>").append(valueAttr.name);
const $input = $("<input>")
.prop("id", inputId)
.prop("attribute-id", valueAttr.attributeId)
.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-type", valueAttr.type)
.prop("attribute-name", valueAttr.name)
.prop("value", valueAttr.value)
@@ -409,9 +410,6 @@ async function loadAttributes() {
$attributeList.show();
}
else {
$attributeList.hide();
}
}
}