added hidePromotedAttributes label, fixes #221

This commit is contained in:
azivner
2018-11-13 22:14:41 +01:00
parent 83c6f86d26
commit abbade96af
3 changed files with 7 additions and 5 deletions

View File

@@ -26,7 +26,8 @@ async function getAttributes() {
async function showAttributes() {
$promotedAttributesContainer.empty();
$attributeList.hide().empty();
$attributeList.hide();
$attributeListInner.empty();
const note = noteDetailService.getCurrentNote();
@@ -37,7 +38,9 @@ async function showAttributes() {
&& !attr.name.startsWith("child:")
&& attr.value.isPromoted);
if (promoted.length > 0) {
const hidePromotedAttributes = attributes.some(attr => attr.type === 'label' && attr.name === 'hidePromotedAttributes');
if (promoted.length > 0 && !hidePromotedAttributes) {
const $tbody = $("<tbody>");
for (const definitionAttr of promoted) {