From 9edfcba9a9f39c2421aeddbbdd3d3270439c0bcb Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Mon, 29 Jan 2024 16:06:37 +0800 Subject: [PATCH] Hide item notes list section in context pane for parentless attachments --- chrome/content/zotero/elements/contextNotesList.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/elements/contextNotesList.js b/chrome/content/zotero/elements/contextNotesList.js index b1b59cae3a..8042a19e02 100644 --- a/chrome/content/zotero/elements/contextNotesList.js +++ b/chrome/content/zotero/elements/contextNotesList.js @@ -30,7 +30,7 @@ class ContextNotesList extends XULElementBase { content = MozXULElement.parseXULToFragment(` - + @@ -105,6 +105,7 @@ } init() { + this._itemNotesSectionContainer = this.querySelector('.item-notes-container'); this._itemNotesSection = this.querySelector('.item-notes'); this._allNotesSection = this.querySelector('.all-notes'); @@ -122,6 +123,8 @@ render() { this._itemNotesSection.empty = !this._itemNotes.length; this._allNotesSection.empty = !this._allNotes.length; + + this._itemNotesSectionContainer.hidden = !this._hasParent; let itemNotesBody = this._itemNotesSection.querySelector('.body'); let allNotesBody = this._allNotesSection.querySelector('.body');