diff --git a/chrome/content/zotero/elements/itemDetails.js b/chrome/content/zotero/elements/itemDetails.js index 3358b8857e..a99e9559cd 100644 --- a/chrome/content/zotero/elements/itemDetails.js +++ b/chrome/content/zotero/elements/itemDetails.js @@ -277,7 +277,7 @@ // Create let currentPaneIDs = currentPaneElements.map(elem => elem.dataset.pane); for (let section of targetPanes) { - let { paneID, head, sidenav, bodyXHTML, + let { paneID, header, sidenav, bodyXHTML, onInit, onDestroy, onItemChange, onRender, onAsyncRender, onToggle, sectionButtons } = section; if (currentPaneIDs.includes(paneID)) continue; @@ -285,7 +285,7 @@ elem.dataset.sidenavOptions = JSON.stringify(sidenav || {}); elem.paneID = paneID; elem.bodyXHTML = bodyXHTML; - elem.registerSectionIcon({ icon: head.icon, darkIcon: head.darkIcon }); + elem.registerSectionIcon({ icon: header.icon, darkIcon: header.darkIcon }); elem.registerHook({ type: "init", callback: onInit }); elem.registerHook({ type: "destroy", callback: onDestroy }); elem.registerHook({ type: "itemChange", callback: onItemChange }); @@ -298,8 +298,8 @@ } } this._paneParent.append(elem); - elem.setL10nID(head.l10nID); - elem.setL10nArgs(head.l10nArgs); + elem.setL10nID(header.l10nID); + elem.setL10nArgs(header.l10nArgs); this._intersectionOb.observe(elem); this.sidenav.addPane(paneID); } diff --git a/chrome/content/zotero/xpcom/itemPaneManager.js b/chrome/content/zotero/xpcom/itemPaneManager.js index 25783281e1..ad179d8ad0 100644 --- a/chrome/content/zotero/xpcom/itemPaneManager.js +++ b/chrome/content/zotero/xpcom/itemPaneManager.js @@ -68,7 +68,7 @@ * @type {object} * @property {string} paneID - Unique pane ID * @property {string} pluginID - Set plugin ID to auto remove section when plugin is disabled/removed - * @property {SectionL10n & SectionIcon} head - Header options. Icon should be 16*16 and `label` need to be localized + * @property {SectionL10n & SectionIcon} header - Header options. Icon should be 16*16 and `label` need to be localized * @property {SectionL10n & SectionIcon} sidenav - Sidenav options. Icon should be 20*20 and `tooltiptext` need to be localized * @property {string} [bodyXHTML] - Pane body's innerHTML, default to XUL namespace * @property {(props: SectionInitHookArgs) => void} [onInit] @@ -208,7 +208,7 @@ class ItemPaneManager { let requiredParamsType = { paneID: "string", pluginID: "string", - head: (val) => { + header: (val) => { if (typeof val != "object") { return "ItemPaneManager section options head must be object"; }