From 347caaff4ca5756c3ed277f18b0ea6ee7b9a5169 Mon Sep 17 00:00:00 2001
From: windingwind <33902321+windingwind@users.noreply.github.com>
Date: Sat, 8 Jun 2024 22:58:05 +0800
Subject: [PATCH] Rename itemBox > infoBox
Following the discussion in #4114
---
chrome/content/zotero-platform/win/overlay.css | 8 --------
chrome/content/zotero/customElements.js | 3 ++-
.../content/zotero/elements/duplicatesMergePane.js | 10 +++++-----
chrome/content/zotero/elements/itemBox.js | 8 ++++----
chrome/content/zotero/elements/itemDetails.js | 2 +-
chrome/content/zotero/elements/mergeGroup.js | 2 +-
chrome/content/zotero/xpcom/schema.js | 2 +-
chrome/content/zotero/zoteroPane.js | 6 +++---
scss/_zotero.scss | 2 +-
scss/elements/_duplicatesMergePane.scss | 6 +++---
scss/elements/{_itemBox.scss => _infoBox.scss} | 4 ++--
.../elements/{_itemBox.scss => _infoBox.scss} | 2 +-
scss/win/elements/{_itemBox.scss => _infoBox.scss} | 2 +-
scss/zotero-unix.scss | 2 +-
scss/zotero-win.scss | 2 +-
test/tests/itemPaneTest.js | 14 +++++++-------
16 files changed, 34 insertions(+), 41 deletions(-)
rename scss/elements/{_itemBox.scss => _infoBox.scss} (99%)
rename scss/linux/elements/{_itemBox.scss => _infoBox.scss} (88%)
rename scss/win/elements/{_itemBox.scss => _infoBox.scss} (98%)
diff --git a/chrome/content/zotero-platform/win/overlay.css b/chrome/content/zotero-platform/win/overlay.css
index 6ac37edd03..5171f664f4 100644
--- a/chrome/content/zotero-platform/win/overlay.css
+++ b/chrome/content/zotero-platform/win/overlay.css
@@ -17,14 +17,6 @@ tree {
padding-left: 0.05em;
}
-.zotero-editpane-item-box > scrollbox, .zotero-view-item > tabpanel > vbox,
-#zotero-editpane-tags > scrollbox, .zotero-editpane-related {
- padding-top: 5px;
-}
-
-#zotero-editpane-tags > scrollbox {
- padding-left: 5px;
-}
/*
Default scrollbar displays up/down arrows even
diff --git a/chrome/content/zotero/customElements.js b/chrome/content/zotero/customElements.js
index d64bc9d7e6..07160e81f8 100644
--- a/chrome/content/zotero/customElements.js
+++ b/chrome/content/zotero/customElements.js
@@ -40,7 +40,8 @@ Services.scriptloader.loadSubScript('chrome://zotero/content/elements/itemTreeMe
['context-pane', 'chrome://zotero/content/elements/contextPane.js'],
['duplicates-merge-pane', 'chrome://zotero/content/elements/duplicatesMergePane.js'],
['guidance-panel', 'chrome://zotero/content/elements/guidancePanel.js'],
- ['item-box', 'chrome://zotero/content/elements/itemBox.js'],
+ // TODO: rename itemBox.js to infoBox.js later to avoid conflict
+ ['info-box', 'chrome://zotero/content/elements/itemBox.js'],
['item-details', 'chrome://zotero/content/elements/itemDetails.js'],
['item-pane', 'chrome://zotero/content/elements/itemPane.js'],
['item-message-pane', 'chrome://zotero/content/elements/itemMessagePane.js'],
diff --git a/chrome/content/zotero/elements/duplicatesMergePane.js b/chrome/content/zotero/elements/duplicatesMergePane.js
index 8895b818e4..d2187bfef1 100644
--- a/chrome/content/zotero/elements/duplicatesMergePane.js
+++ b/chrome/content/zotero/elements/duplicatesMergePane.js
@@ -41,8 +41,8 @@
&zotero.duplicatesMerge.fieldSelect;
-
-
+
+
`, ['chrome://zotero/locale/zotero.dtd']);
@@ -110,7 +110,7 @@
let button = document.getElementById('zotero-duplicates-merge-button');
let versionSelect = document.getElementById('zotero-duplicates-merge-version-select');
- let itembox = document.getElementById('zotero-duplicates-merge-item-box');
+ let itembox = document.getElementById('zotero-duplicates-merge-info-box');
let fieldSelect = document.getElementById('zotero-duplicates-merge-field-select');
let alternatives = oldestItem.multiDiff(otherItems, this._ignoreFields);
@@ -148,7 +148,7 @@
}
setMaster(pos) {
- let itembox = document.getElementById('zotero-duplicates-merge-item-box');
+ let itembox = document.getElementById('zotero-duplicates-merge-info-box');
itembox.mode = 'fieldmerge';
this._otherItems = this._items.concat();
@@ -173,7 +173,7 @@
}
async merge() {
- let itembox = document.getElementById('zotero-duplicates-merge-item-box');
+ let itembox = document.getElementById('zotero-duplicates-merge-info-box');
Zotero.CollectionTreeCache.clear();
// Update master item with any field alternatives from the item box
let json = this._masterItem.toJSON();
diff --git a/chrome/content/zotero/elements/itemBox.js b/chrome/content/zotero/elements/itemBox.js
index ddc2f5979e..9eeaf0ff18 100644
--- a/chrome/content/zotero/elements/itemBox.js
+++ b/chrome/content/zotero/elements/itemBox.js
@@ -36,7 +36,7 @@
false
);
- class ItemBox extends ItemPaneSectionElementBase {
+ class InfoBox extends ItemPaneSectionElementBase {
constructor() {
super();
@@ -69,7 +69,7 @@
return MozXULElement.parseXULToFragment(`
-