Show sidenav in feeds
This commit is contained in:
parent
e7e477fcdb
commit
0b81fef457
6 changed files with 20 additions and 7 deletions
|
@ -34,6 +34,8 @@
|
|||
</html:div>
|
||||
</collapsible-section>
|
||||
`);
|
||||
|
||||
showInFeeds = true;
|
||||
|
||||
_item = null;
|
||||
|
||||
|
|
|
@ -43,6 +43,8 @@
|
|||
this.blurHandler = null;
|
||||
this.eventHandlers = [];
|
||||
|
||||
this.showInFeeds = true;
|
||||
|
||||
this._mode = 'view';
|
||||
this._visibleFields = [];
|
||||
this._hiddenFields = [];
|
||||
|
|
|
@ -165,11 +165,11 @@
|
|||
};
|
||||
|
||||
getPanes() {
|
||||
return Array.from(this.container.querySelectorAll(':scope > [data-pane]'));
|
||||
return Array.from(this.container.querySelectorAll(':scope > [data-pane]:not([hidden])'));
|
||||
}
|
||||
|
||||
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) {
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
</html:div>
|
||||
`, ['chrome://zotero/locale/zotero.dtd']);
|
||||
|
||||
showInFeeds = true;
|
||||
|
||||
_item = null;
|
||||
|
||||
_titleFieldID = null;
|
||||
|
|
|
@ -89,6 +89,16 @@ var ZoteroItemPane = new function() {
|
|||
|
||||
let inTrash = ZoteroPane.collectionsView.selectedTreeRow && ZoteroPane.collectionsView.selectedTreeRow.isTrash();
|
||||
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) {
|
||||
box.mode = mode;
|
||||
|
||||
|
@ -112,6 +122,8 @@ var ZoteroItemPane = new function() {
|
|||
else if (pinnedPane !== false) {
|
||||
_sidenav.scrollToPane('info', 'instant');
|
||||
}
|
||||
|
||||
_sidenav.render();
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -43,11 +43,6 @@
|
|||
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 > * {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
|
|
Loading…
Reference in a new issue