mirror of
https://github.com/zotero/zotero.git
synced 2026-10-04 02:31:47 +00:00
Display libraries and collections box for standalone notes and attachments (#5554)
Display Libraries and Collections box in the itemPane for standalone notes and attachments. Fixes: #5553
This commit is contained in:
parent
dd19cf58cc
commit
ac36b6d361
2 changed files with 11 additions and 1 deletions
|
|
@ -46,7 +46,10 @@ import { getCSSIcon } from 'components/icons';
|
|||
}
|
||||
|
||||
set item(item) {
|
||||
if (item?.isRegularItem() && !item?.isFeedItem) {
|
||||
let isRegularItem = item?.isRegularItem() && !item?.isFeedItem;
|
||||
let isStandaloneAttachment = item?.isAttachment() && !item.parentItemID;
|
||||
let isStandaloneNote = item?.isNote() && !item.parentItemID;
|
||||
if (isRegularItem || isStandaloneAttachment || isStandaloneNote) {
|
||||
this.hidden = false;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -361,6 +361,7 @@
|
|||
<html:div id="parent-value" class="value zotero-clicky" hidden="true"/>
|
||||
-->
|
||||
<tags-box id="tags"/>
|
||||
<libraries-collections-box id="libraries-collections"/>
|
||||
<related-box id="related"/>
|
||||
`, ['chrome://zotero/locale/zotero.dtd']);
|
||||
}
|
||||
|
|
@ -388,6 +389,12 @@
|
|||
this._item = val;
|
||||
this._id('related').item = this._item;
|
||||
this._id('tags').item = this._item;
|
||||
if (this._item.parentItem) {
|
||||
this._id('libraries-collections').hidden = true;
|
||||
}
|
||||
else {
|
||||
this._id('libraries-collections').item = this._item;
|
||||
}
|
||||
|
||||
this.refresh();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue