summaryrefslogtreecommitdiffstats
path: root/mailnews/base/prefs/content/am-addressing.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-03 00:17:46 -0400
committerMatt A. Tobin <email@mattatobin.com>2019-11-03 00:17:46 -0400
commit302bf1b523012e11b60425d6eee1221ebc2724eb (patch)
treeb191a895f8716efcbe42f454f37597a545a6f421 /mailnews/base/prefs/content/am-addressing.js
parent21b3f6247403c06f85e1f45d219f87549862198f (diff)
downloadUXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar
UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar.gz
UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar.lz
UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar.xz
UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.zip
Issue #1258 - Part 1: Import mailnews, ldap, and mork from comm-esr52.9.1
Diffstat (limited to 'mailnews/base/prefs/content/am-addressing.js')
-rw-r--r--mailnews/base/prefs/content/am-addressing.js79
1 files changed, 79 insertions, 0 deletions
diff --git a/mailnews/base/prefs/content/am-addressing.js b/mailnews/base/prefs/content/am-addressing.js
new file mode 100644
index 000000000..9f2584767
--- /dev/null
+++ b/mailnews/base/prefs/content/am-addressing.js
@@ -0,0 +1,79 @@
+/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+Components.utils.import("resource://gre/modules/Services.jsm");
+
+function onLoad()
+{
+ parent.onPanelLoaded('am-addressing.xul');
+}
+
+function onInit(aPageId, aServerId)
+{
+ onInitCompositionAndAddressing();
+}
+
+function onInitCompositionAndAddressing()
+{
+ LDAPenabling();
+ quoteEnabling();
+}
+
+function onEditDirectories()
+{
+ window.openDialog("chrome://messenger/content/addressbook/pref-editdirectories.xul",
+ "editDirectories", "chrome,modal=yes,resizable=no", null);
+}
+
+function onPreInit(account, accountValues)
+{
+}
+
+function LDAPenabling()
+{
+ onCheckItem("identity.directoryServer", ["directories"]);
+ onCheckItem("editButton", ["directories"]);
+}
+
+function quoteEnabling()
+{
+ var quotebox = document.getElementById("thenBox");
+ var placebox = document.getElementById("placeBox");
+ var quotecheck = document.getElementById("identity.autoQuote");
+
+ if (quotecheck.checked && !quotecheck.disabled &&
+ (document.getElementById("identity.replyOnTop").value == 1)) {
+ placebox.firstChild.removeAttribute("disabled");
+ placebox.lastChild.removeAttribute("disabled");
+ }
+ else {
+ placebox.firstChild.setAttribute("disabled", "true");
+ placebox.lastChild.setAttribute("disabled", "true");
+ }
+ if (quotecheck.checked && !quotecheck.disabled) {
+ quotebox.firstChild.removeAttribute("disabled");
+ quotebox.lastChild.removeAttribute("disabled");
+ }
+ else {
+ quotebox.firstChild.setAttribute("disabled", "true");
+ quotebox.lastChild.setAttribute("disabled", "true");
+ }
+}
+
+/**
+ * Open the Preferences dialog on the tab with Addressing options.
+ */
+function showGlobalAddressingPrefs()
+{
+ openPrefsFromAccountManager("paneCompose", "addressingTab", null, "addressing_pane");
+}
+
+/**
+ * Open the Preferences dialog on the tab with Composing options.
+ */
+function showGlobalComposingPrefs()
+{
+ openPrefsFromAccountManager("paneCompose", "generalTab", null, "composing_messages_pane");
+}