mirror of
https://github.com/zotero/zotero.git
synced 2026-10-03 02:21:49 +00:00
Citation Explorer: enable add to button on any row
This commit is contained in:
parent
cf058891c1
commit
14495b5982
1 changed files with 4 additions and 4 deletions
|
|
@ -690,12 +690,12 @@ window.ZoteroCitationExplorer = {
|
|||
let focusedRow = itemList.getRow(itemList.selection.focused);
|
||||
let isItemRow = focusedRow instanceof CitationExplorerItemTreeRow;
|
||||
let isUnlinked = isItemRow && !focusedRow.isLinked;
|
||||
let noneSelected = selectedRows.length === 0;
|
||||
let noneItemsSelected = selectedRows.length === 0;
|
||||
let anyUnlinkedSelected = selectedRows.some(row => !row.isLinked);
|
||||
|
||||
document.querySelector('#button-show-in-zotero').disabled = noneSelected || !isItemRow || isUnlinked;
|
||||
document.querySelector('#button-relink-item').disabled = noneSelected || !anyUnlinkedSelected;
|
||||
document.querySelector('#button-addTo-library').disabled = noneSelected || !anyUnlinkedSelected;
|
||||
document.querySelector('#button-show-in-zotero').disabled = noneItemsSelected || !isItemRow || isUnlinked;
|
||||
document.querySelector('#button-relink-item').disabled = noneItemsSelected || !anyUnlinkedSelected;
|
||||
document.querySelector('#button-addTo-library').disabled = noneItemsSelected;
|
||||
|
||||
await this.refreshCitationList();
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue