From e1fed84ccfed97ece1626c6725095c96239c7143 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 15 Sep 2024 21:16:14 +0200 Subject: [PATCH] Adjustments to Mac Word installation banner (#4660) - Use real buttons and other tweaks from design - Use existing .properties string for "Don't Ask Again" for now - Remove close button - Update submodule for reminder after 24 hours instead of 7 --- app/modules/zotero-word-for-mac-integration | 2 +- chrome/content/zotero/zoteroPane.js | 16 +++++++--------- chrome/content/zotero/zoteroPane.xhtml | 14 ++++++++++---- chrome/locale/en-US/zotero/zotero.ftl | 11 ++++++++--- scss/components/_banners.scss | 16 ++++++++++++++-- 5 files changed, 40 insertions(+), 19 deletions(-) diff --git a/app/modules/zotero-word-for-mac-integration b/app/modules/zotero-word-for-mac-integration index 31f5d8d145..8225aee7ab 160000 --- a/app/modules/zotero-word-for-mac-integration +++ b/app/modules/zotero-word-for-mac-integration @@ -1 +1 @@ -Subproject commit 31f5d8d145a231713cfb27e3477e774c29942c81 +Subproject commit 8225aee7abe1e5911a42f01b711530b9d9a2cfbb diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index a338244f3f..7cf9f26648 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -6132,21 +6132,19 @@ var ZoteroPane = new function() */ this.showMacWordPluginInstallWarning = function () { return new Promise((resolve) => { - const panel = document.querySelector('#mac-word-plugin-install-warning'); - const action = panel.querySelector('.link'); - const close = panel.querySelector('.close-link'); - const remind = panel.querySelector('.remind-later-link'); - const dontAskAgain = panel.querySelector('.dont-ask-again-link'); + const panel = document.getElementById('mac-word-plugin-install-warning'); + const action = document.getElementById('mac-word-plugin-install-action'); + const remind = document.getElementById('mac-word-plugin-install-remind-later'); + const dontAskAgain = document.getElementById('mac-word-plugin-install-dont-ask-again'); + + // TODO: Replace with ftl string + dontAskAgain.label = Zotero.getString('general.dontAskAgain'); panel.removeAttribute('collapsed'); action.onclick = () => { this.hideMacWordPluginInstallWarning(); resolve({ install: true }); }; - close.onclick = () => { - this.hideMacWordPluginInstallWarning(); - resolve({ dismiss: true }); - }; remind.onclick = () => { this.hideMacWordPluginInstallWarning(); resolve({ remindLater: true }); diff --git a/chrome/content/zotero/zoteroPane.xhtml b/chrome/content/zotero/zoteroPane.xhtml index 36c814e190..ce42169111 100644 --- a/chrome/content/zotero/zoteroPane.xhtml +++ b/chrome/content/zotero/zoteroPane.xhtml @@ -1135,11 +1135,17 @@