From 6704b755d876b79599a5b9ce0fe62b5c9d2a4f9f Mon Sep 17 00:00:00 2001 From: azivner Date: Tue, 1 Jan 2019 15:29:58 +0100 Subject: [PATCH] attribute overview shows only owned attributes --- package-lock.json | 2 +- src/public/javascripts/services/attributes.js | 7 +++++-- src/public/stylesheets/desktop.css | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e7193a97f..8d7766c32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "trilium", - "version": "0.26.1", + "version": "0.27.0-beta", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/public/javascripts/services/attributes.js b/src/public/javascripts/services/attributes.js index d9232d0f4..ac362371d 100644 --- a/src/public/javascripts/services/attributes.js +++ b/src/public/javascripts/services/attributes.js @@ -85,8 +85,11 @@ async function showAttributes() { $promotedAttributesContainer.empty().append($tbody); } else if (note.type !== 'relation-map') { - if (attributes.length > 0) { - for (const attribute of attributes) { + // display only "own" notes + const ownedAttributes = attributes.filter(attr => attr.noteId === note.noteId); + + if (ownedAttributes.length > 0) { + for (const attribute of ownedAttributes) { if (attribute.type === 'label') { $attributeListInner.append(utils.formatLabel(attribute) + " "); } diff --git a/src/public/stylesheets/desktop.css b/src/public/stylesheets/desktop.css index f5702870a..17419d075 100644 --- a/src/public/stylesheets/desktop.css +++ b/src/public/stylesheets/desktop.css @@ -53,6 +53,7 @@ padding: 10px 0 10px 0; margin: 0 10px 0 16px; border: 1px solid #ccc; + border-radius: 5px; } #context-menu-container {