From 8d784f2397920327d44306309e1af45d81ecf2c5 Mon Sep 17 00:00:00 2001 From: Magnus Melin Date: Sat, 27 Aug 2022 20:31:16 +1000 Subject: [PATCH] Bug 1787393 - Remove vestages of dialog help button - port bug 1784882. r=aleca The OTR help button is a one-off, so let's just drop it. Differential Revision: https://phabricator.services.mozilla.com/D155671 --HG-- extra : rebase_source : e1e942157e7492d7ce97d7d6acbf9a688ca812c6 extra : amend_source : 20cb89300df0846aed1c29ad819ce991754a4072 --- chat/content/otr-auth.js | 13 ------------- chat/content/otr-auth.xhtml | 2 +- mail/extensions/openpgp/content/ui/keyWizard.js | 12 ++++++------ mail/extensions/openpgp/content/ui/keyWizard.xhtml | 4 ++-- mail/locales/en-US/messenger/openpgp/keyWizard.ftl | 4 ++-- mail/locales/en-US/messenger/otr/auth.ftl | 3 --- 6 files changed, 11 insertions(+), 27 deletions(-) diff --git a/chat/content/otr-auth.js b/chat/content/otr-auth.js index 1cd05edab6..bfd3fc3d46 100644 --- a/chat/content/otr-auth.js +++ b/chat/content/otr-auth.js @@ -89,10 +89,6 @@ var otrAuth = { return this.cancel(); }); - document.addEventListener("dialoghelp", () => { - return this.help(); - }); - let context, theirs; switch (mode) { case "start": @@ -201,13 +197,4 @@ var otrAuth = { } showSection(how); }, - - async help() { - let [helpTitle, helpText] = await document.l10n.formatValues([ - { id: "auth-help-title" }, - { id: "auth-help" }, - ]); - - Services.prompt.alert(window, helpTitle, helpText); - }, }; diff --git a/chat/content/otr-auth.xhtml b/chat/content/otr-auth.xhtml index e4ee2e4e1f..dd0b00316e 100644 --- a/chat/content/otr-auth.xhtml +++ b/chat/content/otr-auth.xhtml @@ -20,7 +20,7 @@ - diff --git a/mail/extensions/openpgp/content/ui/keyWizard.js b/mail/extensions/openpgp/content/ui/keyWizard.js index b19d5e7488..ea023e711d 100644 --- a/mail/extensions/openpgp/content/ui/keyWizard.js +++ b/mail/extensions/openpgp/content/ui/keyWizard.js @@ -75,7 +75,7 @@ var syncl10n = new Localization(["messenger/openpgp/keyWizard.ftl"], true); // Dialog event listeners. document.addEventListener("dialogaccept", wizardContinue); -document.addEventListener("dialoghelp", goBack); +document.addEventListener("dialogextra1", goBack); document.addEventListener("dialogcancel", onClose); /** @@ -247,8 +247,8 @@ function switchSection() { break; } - // Show the `Go Back` button. - kDialog.getButton("help").removeAttribute("hidden"); + // Show the `Go back` button. + kDialog.getButton("extra1").hidden = false; resizeDialog(); } @@ -292,7 +292,7 @@ function goBack() { */ function backToStart(event) { // Hide the `Go Back` button. - kDialog.getButton("help").setAttribute("hidden", true); + kDialog.getButton("extra1").hidden = true; // Enable the `Continue` button. kDialog.getButton("accept").removeAttribute("disabled"); @@ -939,8 +939,8 @@ async function openPgpImportStart() { // Show the successful final screen only if at least one key was imported. if (keyCount) { // Update the dialog buttons for the final stage. - kDialog.getButton("help").setAttribute("hidden", true); - kDialog.getButton("cancel").setAttribute("hidden", true); + kDialog.getButton("extra1").hidden = true; + kDialog.getButton("cancel").hidden = true; // Update the `Continue` button. document.l10n.setAttributes( diff --git a/mail/extensions/openpgp/content/ui/keyWizard.xhtml b/mail/extensions/openpgp/content/ui/keyWizard.xhtml index 74caa815d8..43fc9c8b7a 100644 --- a/mail/extensions/openpgp/content/ui/keyWizard.xhtml +++ b/mail/extensions/openpgp/content/ui/keyWizard.xhtml @@ -18,8 +18,8 @@ lightweightthemes="true" style="width: 50em;">