small fixes

This commit is contained in:
zadam 2020-03-29 20:37:40 +02:00
parent 189202b1f6
commit 0973498fe9
2 changed files with 14 additions and 3 deletions

View File

@ -183,7 +183,10 @@ class NoteShort {
if (this.noteId !== 'root') {
for (const parentNote of this.getParentNotes()) {
attrArrs.push(parentNote.getInheritableAttributes());
// these virtual parent-child relationships are also loaded into frontend tree cache
if (parentNote.type !== 'search') {
attrArrs.push(parentNote.getInheritableAttributes());
}
}
}

View File

@ -74,9 +74,17 @@ export default class StandardTopWidget extends BasicWidget {
this.$widget.find(".jump-to-note-dialog-button").on('click', () => this.triggerCommand('jumpToNote'));
this.$widget.find(".recent-changes-button").on('click', () => this.triggerCommand('showRecentChanges'));
this.$widget.find(".enter-protected-session-button").on('click', protectedSessionService.enterProtectedSession);
this.$widget.find(".leave-protected-session-button").on('click', protectedSessionService.leaveProtectedSession);
this.$enterProtectedSessionButton = this.$widget.find(".enter-protected-session-button");
this.$enterProtectedSessionButton.on('click', protectedSessionService.enterProtectedSession);
this.$leaveProtectedSessionButton = this.$widget.find(".leave-protected-session-button");
this.$leaveProtectedSessionButton.on('click', protectedSessionService.leaveProtectedSession);
return this.$widget
}
protectedSessionStartedEvent() {
this.$enterProtectedSessionButton.hide();
this.$leaveProtectedSessionButton.show();
}
}