Show sidenav in feeds

This commit is contained in:
Abe Jellinek 2023-12-21 16:32:52 -08:00 committed by Dan Stillman
parent e7e477fcdb
commit 0b81fef457
6 changed files with 20 additions and 7 deletions

View file

@ -34,6 +34,8 @@
</html:div> </html:div>
</collapsible-section> </collapsible-section>
`); `);
showInFeeds = true;
_item = null; _item = null;

View file

@ -43,6 +43,8 @@
this.blurHandler = null; this.blurHandler = null;
this.eventHandlers = []; this.eventHandlers = [];
this.showInFeeds = true;
this._mode = 'view'; this._mode = 'view';
this._visibleFields = []; this._visibleFields = [];
this._hiddenFields = []; this._hiddenFields = [];

View file

@ -165,11 +165,11 @@
}; };
getPanes() { getPanes() {
return Array.from(this.container.querySelectorAll(':scope > [data-pane]')); return Array.from(this.container.querySelectorAll(':scope > [data-pane]:not([hidden])'));
} }
getPane(id) { getPane(id) {
return this.container.querySelector(`:scope > [data-pane="${CSS.escape(id)}"]`); return this.container.querySelector(`:scope > [data-pane="${CSS.escape(id)}"]:not([hidden])`);
} }
isPanePinnable(id) { isPanePinnable(id) {

View file

@ -46,6 +46,8 @@
</html:div> </html:div>
`, ['chrome://zotero/locale/zotero.dtd']); `, ['chrome://zotero/locale/zotero.dtd']);
showInFeeds = true;
_item = null; _item = null;
_titleFieldID = null; _titleFieldID = null;

View file

@ -89,6 +89,16 @@ var ZoteroItemPane = new function() {
let inTrash = ZoteroPane.collectionsView.selectedTreeRow && ZoteroPane.collectionsView.selectedTreeRow.isTrash(); let inTrash = ZoteroPane.collectionsView.selectedTreeRow && ZoteroPane.collectionsView.selectedTreeRow.isTrash();
for (let box of [_header, ..._boxes]) { for (let box of [_header, ..._boxes]) {
if (!box.showInFeeds && item.isFeedItem) {
box.style.display = 'none';
box.hidden = true;
continue;
}
else {
box.style.display = '';
box.hidden = false;
}
if (mode) { if (mode) {
box.mode = mode; box.mode = mode;
@ -112,6 +122,8 @@ var ZoteroItemPane = new function() {
else if (pinnedPane !== false) { else if (pinnedPane !== false) {
_sidenav.scrollToPane('info', 'instant'); _sidenav.scrollToPane('info', 'instant');
} }
_sidenav.render();
}); });

View file

@ -43,11 +43,6 @@
pointer-events: none; pointer-events: none;
} }
.zotero-view-item-container.feed-item .zotero-view-item > :is(attachments-box, notes-box, tags-box, related-box),
.zotero-view-item-container.feed-item .zotero-view-item-sidenav {
display: none;
}
.zotero-view-item > * { .zotero-view-item > * {
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;