parent
c826805bca
commit
5cc6631fd3
4 changed files with 19 additions and 13 deletions
|
@ -37,12 +37,13 @@
|
|||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
<groupbox flex="1">
|
||||
<description id="zotero-duplicates-merge-field-select">&zotero.duplicatesMerge.fieldSelect;</description>
|
||||
<vbox id="zotero-duplicates-merge-item-box-container" flex="1">
|
||||
<item-box id="zotero-duplicates-merge-item-box" flex="1"/>
|
||||
</vbox>
|
||||
<groupbox id="zotero-duplicates-merge-field-select">
|
||||
<description>&zotero.duplicatesMerge.fieldSelect;</description>
|
||||
</groupbox>
|
||||
|
||||
<vbox id="zotero-duplicates-merge-item-box-container">
|
||||
<item-box id="zotero-duplicates-merge-item-box"/>
|
||||
</vbox>
|
||||
`, ['chrome://zotero/locale/zotero.dtd']);
|
||||
|
||||
init() {
|
||||
|
|
|
@ -669,15 +669,15 @@
|
|||
|
||||
this.addDynamicRow(rowLabel, rowData);
|
||||
|
||||
let button, popup;
|
||||
// In field merge mode, add a button to switch field versions
|
||||
if (this.mode == 'fieldmerge' && typeof this._fieldAlternatives[fieldName] != 'undefined') {
|
||||
var button = document.createXULElement("toolbarbutton");
|
||||
button = document.createXULElement("toolbarbutton");
|
||||
button.className = 'zotero-field-version-button zotero-clicky-merge';
|
||||
button.setAttribute('type', 'menu');
|
||||
let fieldLocalName = rowLabel.querySelector("label")?.textContent;
|
||||
document.l10n.setAttributes(button, 'itembox-button-merge', { field: fieldLocalName || "" });
|
||||
|
||||
var popup = button.appendChild(document.createXULElement("menupopup"));
|
||||
popup = button.appendChild(document.createXULElement("menupopup"));
|
||||
|
||||
for (let v of this._fieldAlternatives[fieldName]) {
|
||||
let menuitem = document.createXULElement("menuitem");
|
||||
|
@ -697,6 +697,10 @@
|
|||
});
|
||||
popup.appendChild(menuitem);
|
||||
}
|
||||
|
||||
button.addEventListener("click", (e) => {
|
||||
this.handlePopupOpening(e, popup);
|
||||
});
|
||||
|
||||
rowData.appendChild(button);
|
||||
}
|
||||
|
|
|
@ -552,6 +552,7 @@
|
|||
}
|
||||
case "duplicates": {
|
||||
this._deck.selectedIndex = 3;
|
||||
this.removeAttribute("collapsed");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ duplicates-merge-pane {
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
scrollbar-color: var(--color-scrollbar) var(--color-scrollbar-background);
|
||||
}
|
||||
|
||||
padding-top: 9px;
|
||||
|
@ -19,15 +20,14 @@ duplicates-merge-pane {
|
|||
}
|
||||
}
|
||||
|
||||
#zotero-duplicates-merge-field-select {
|
||||
margin-bottom: 9px;
|
||||
}
|
||||
|
||||
#zotero-duplicates-merge-item-box-container {
|
||||
flex: 1;
|
||||
padding-inline: 8px;
|
||||
overflow-y: scroll;
|
||||
border-top: var(--material-border-quinary);
|
||||
|
||||
#zotero-duplicates-merge-item-box {
|
||||
border-top: var(--material-border-quinary);
|
||||
}
|
||||
|
||||
collapsible-section > .head {
|
||||
display: none;
|
||||
|
|
Loading…
Reference in a new issue