removed children overview (will be replaced by book)

This commit is contained in:
zadam
2019-10-05 12:06:06 +02:00
parent ea71e96f72
commit cbc7710d81
5 changed files with 6 additions and 69 deletions

View File

@@ -65,7 +65,6 @@ class TabContext {
this.$notePathList = this.$tabContent.find(".note-path-list");
this.$notePathCount = this.$tabContent.find(".note-path-count");
this.$noteDetailComponents = this.$tabContent.find(".note-detail-component");
this.$childrenOverview = this.$tabContent.find(".children-overview");
this.$scriptArea = this.$tabContent.find(".note-detail-script-area");
this.$savedIndicator = this.$tabContent.find(".saved-indicator");
this.noteChangeDisabled = false;
@@ -180,8 +179,6 @@ class TabContext {
if (utils.isDesktop()) {
this.noteType.update();
this.showChildrenOverview();
}
if (this.sidebar) {
@@ -365,31 +362,6 @@ class TabContext {
this.$savedIndicator.fadeOut();
}
async showChildrenOverview() {
const attributes = await this.attributes.getAttributes();
const hideChildrenOverview = attributes.some(attr => attr.type === 'label' && attr.name === 'hideChildrenOverview')
|| ['relation-map', 'image', 'file', 'book'].includes(this.note.type);
if (hideChildrenOverview) {
this.$childrenOverview.hide();
return;
}
this.$childrenOverview.empty();
for (const childBranch of await this.note.getChildBranches()) {
const link = $('<a>', {
href: 'javascript:',
text: await treeUtils.getNoteTitle(childBranch.noteId, childBranch.parentNoteId)
}).attr('data-action', 'note').attr('data-note-path', this.notePath + '/' + childBranch.noteId);
const childEl = $('<div class="child-overview-item">').html(link);
this.$childrenOverview.append(childEl);
}
this.$childrenOverview.show();
}
async addPath(notePath, isCurrent) {
const title = await treeUtils.getNotePathTitle(notePath);