diff --git a/src/public/app/entities/branch.js b/src/public/app/entities/branch.js index 4bcb8b93c..61ad40897 100644 --- a/src/public/app/entities/branch.js +++ b/src/public/app/entities/branch.js @@ -20,8 +20,6 @@ class Branch { /** @param {boolean} */ this.isExpanded = !!row.isExpanded; /** @param {boolean} */ - this.isDeleted = !!row.isDeleted; - /** @param {boolean} */ this.fromSearchNote = !!row.fromSearchNote; } diff --git a/src/public/app/widgets/note_list.js b/src/public/app/widgets/note_list.js index 65fc80694..cabf5088f 100644 --- a/src/public/app/widgets/note_list.js +++ b/src/public/app/widgets/note_list.js @@ -1,6 +1,5 @@ import TabAwareWidget from "./tab_aware_widget.js"; import NoteListRenderer from "../services/note_list_renderer.js"; -import utils from "../services/utils.js"; const TPL = `
@@ -11,6 +10,10 @@ const TPL = ` min-height: 0; overflow: auto; } + + .note-list-widget .note-list { + padding: 10px; + }
diff --git a/src/routes/api/tree.js b/src/routes/api/tree.js index ae70634c1..d03986338 100644 --- a/src/routes/api/tree.js +++ b/src/routes/api/tree.js @@ -21,6 +21,12 @@ function getNotesAndBranchesAndAttributes(noteIds) { collectEntityIds(branch.parentNote); } + for (const childNote of note.children) { + const childBranch = noteCache.getBranch(childNote.noteId, note.noteId); + + collectedBranchIds.add(childBranch.branchId); + } + for (const attr of note.ownedAttributes) { collectedAttributeIds.add(attr.attributeId); @@ -51,7 +57,7 @@ function getNotesAndBranchesAndAttributes(noteIds) { isProtected: note.isProtected, type: note.type, mime: note.mime, - isDeleted: note.isDeleted + isDeleted: false // FIXME }); } @@ -106,16 +112,16 @@ function getNotesAndBranchesAndAttributes(noteIds) { function getTree(req) { const subTreeNoteId = req.query.subTreeNoteId || 'root'; - const collectedNoteIds = new Set(['root']); + const collectedNoteIds = new Set([subTreeNoteId]); function collect(parentNote) { - for (const childNote of parentNote.children || []) { + for (const childNote of parentNote.children) { collectedNoteIds.add(childNote.noteId); const childBranch = noteCache.getBranch(childNote.noteId, parentNote.noteId); if (childBranch.isExpanded) { - collect(childBranch); + collect(childBranch.childNote); } } } diff --git a/src/services/note_cache/entities/attribute.js b/src/services/note_cache/entities/attribute.js index 769e33c8a..5da56160f 100644 --- a/src/services/note_cache/entities/attribute.js +++ b/src/services/note_cache/entities/attribute.js @@ -22,7 +22,7 @@ class Attribute { } /** @param {string} */ - this.value = row.type === 'label' ? row.value.toLowerCase() : row.value; + this.value = row.value; /** @param {boolean} */ this.isInheritable = !!row.isInheritable;