From 15874430b3a6684dc2d023d42fcd51e97f735daa Mon Sep 17 00:00:00 2001 From: "ddrinan%netscape.com" Date: Fri, 19 Oct 2001 21:36:55 +0000 Subject: [PATCH] S/MIME UI work git-svn-id: svn://10.0.0.236/branches/PSM_2_2_DEV_20011002_BRANCH@105826 18797224-902f-48f8-a5cc-f745e15eee43 --- .../prefs/resources/content/am-security.js | 207 ++++++++++++++++++ .../prefs/resources/content/am-security.xul | 80 +++++++ .../resources/locale/en-US/am-security.dtd | 10 + .../resources/locale/en-US/prefs.properties | 1 + .../base/public/nsIMsgIncomingServer.idl | 9 + .../base/src/nsMsgAccountManagerDS.cpp | 11 +- .../mailnews/base/src/nsMsgAccountManagerDS.h | 1 + .../base/util/nsMsgIncomingServer.cpp | 20 ++ .../resources/content/MsgComposeCommands.js | 23 ++ .../resources/content/messengercompose.xul | 10 + .../locale/en-US/messengercompose.dtd | 5 + mozilla/mailnews/jar.mn | 3 + 12 files changed, 379 insertions(+), 1 deletion(-) create mode 100644 mozilla/mailnews/base/prefs/resources/content/am-security.js create mode 100644 mozilla/mailnews/base/prefs/resources/content/am-security.xul create mode 100644 mozilla/mailnews/base/prefs/resources/locale/en-US/am-security.dtd diff --git a/mozilla/mailnews/base/prefs/resources/content/am-security.js b/mozilla/mailnews/base/prefs/resources/content/am-security.js new file mode 100644 index 00000000000..e484cfeef87 --- /dev/null +++ b/mozilla/mailnews/base/prefs/resources/content/am-security.js @@ -0,0 +1,207 @@ +/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * The contents of this file are subject to the Netscape Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998-2001 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributors: + * ddrinan@netscape.com + */ + +var gIncomingServer; +var gServerType; +var gPref = null; +var gLockedPref = null; + +function onInit() +{ + onLockPreference(); + + // init values here + document.getElementById("encryption.ifPossibleEncryptMail").checked = gIncomingServer.ifPossibleEncryptMail; + document.getElementById("encryption.alwaysEncryptMail").checked = gIncomingServer.alwaysEncryptMail; + document.getElementById("encryption.certificateName").setAttribute("value", gIncomingServer.encryptionCertName); + document.getElementById("signing.signMail").checked = gIncomingServer.signMail; + document.getElementById("signing.certificateName").setAttribute("value", gIncomingServer.signingCertName); + + // Disable the encrypt if possibe check box. + document.getElementById("encryption.ifPossibleEncryptMail").setAttribute("disabled", "true"); +} + +function onPreInit(account, accountValues) +{ + + gServerType = getAccountValue(account, accountValues, "server", "type"); + hideShowControls(gServerType); + gIncomingServer= account.incomingServer; + gIncomingServer.type = gServerType; + + var prefBundle = document.getElementById("bundle_prefs"); + var headertitle = document.getElementById("headertitle"); + headertitle.setAttribute('title',prefBundle.getString("prefPanel-security")); +} + +function hideShowControls(type) +{ + + var controls = document.getElementsByAttribute("hidable", "true"); + var len = controls.length; + + for (var i=0; i + + + + + + + + + + + +