Skip to content

Build your personal knowledge base with Trilium Notes

notes with multiple parents are now marked with dashed underline

azivner84a9e9067d9b
diff --git a/public/javascripts/note_tree.js b/public/javascripts/note_tree.js
index 4af51b8bae..691c2a36dc 100644
--- a/public/javascripts/note_tree.js
+++ b/public/javascripts/note_tree.js
@@ -106,8 +106,20 @@ const noteTree = (function() {
note.title = note.note_title;
+ note.extraClasses = "";
+
if (note.is_protected) {
- note.extraClasses = "protected";
+ note.extraClasses += ",protected";
+ }
+
+ if (childToParents[childNoteId].length > 1) {
+ console.log("Multiple classes!");
+
+ note.extraClasses += ",multiple-parents";
+ }
+
+ if (note.extraClasses.startsWith(",")) {
+ note.extraClasses = note.extraClasses.substr(1);
}
note.key = counter++ + ""; // key needs to be string
diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css
index 781ff41ac6..b85aee6713 100644
--- a/public/stylesheets/style.css
+++ b/public/stylesheets/style.css
@@ -73,6 +73,10 @@ span.fancytree-node.protected.fancytree-folder > span.fancytree-icon {
background-image: url("../images/icons/folder-shaded.png");
}
+span.fancytree-node.multiple-parents .fancytree-title {
+ text-decoration: underline dashed;
+}
+
.ui-autocomplete {
max-height: 300px;
overflow-y: auto;