From 088d5783b7c3ef2dc57d0a79e90518aae7de50ed Mon Sep 17 00:00:00 2001 From: "shliang%netscape.com" Date: Wed, 26 Mar 2003 01:54:29 +0000 Subject: [PATCH] 178328 - combine bcc settings in mail account manager copies and folders panel. r=cavin, sr=sspitzer. --- .../base/prefs/resources/content/am-copies.js | 36 ++------ .../prefs/resources/content/am-copies.xul | 18 ++-- .../resources/locale/en-US/am-copies.dtd | 4 +- mailnews/base/public/nsIMsgIdentity.idl | 7 ++ mailnews/base/util/nsMsgIdentity.cpp | 86 +++++++++++++++++++ .../resources/content/MsgComposeCommands.js | 21 ++--- mailnews/compose/src/nsMsgCompose.cpp | 27 ++---- 7 files changed, 116 insertions(+), 83 deletions(-) diff --git a/mailnews/base/prefs/resources/content/am-copies.js b/mailnews/base/prefs/resources/content/am-copies.js index 7fea477b8f5..2214976979f 100644 --- a/mailnews/base/prefs/resources/content/am-copies.js +++ b/mailnews/base/prefs/resources/content/am-copies.js @@ -60,9 +60,10 @@ function onInit() { tmplAccountPickerId, "identity.stationeryFolder", tmplFolderPickerId); - initBccSelf(); + + setupBccTextbox(); setupFccItems(); - setupBCCTextbox(); + SetSpecialFolderNamesWithDelims(); } @@ -164,29 +165,6 @@ function InitFolderDisplay(fieldname, pickerId) { SetFolderPicker(uri,pickerId); } -function initBccSelf() { - var bccValue = document.getElementById("identity.email").getAttribute("value"); - setDivText("identity.bccSelf",bccValue); -} - -function setDivText(divid, str) { - var divtag = document.getElementById(divid); - - var newstr=""; - if (divtag) { - - if (divtag.getAttribute("before")) - newstr += divtag.getAttribute("before"); - - newstr += str; - - if (divtag.getAttribute("after")) - newstr += divtag.getAttribute("after"); - - divtag.setAttribute("label", newstr); - } -} - // Capture any menulist changes function noteSelectionChange(radioItemId) { @@ -325,12 +303,12 @@ function setupFccItems() } // Disable BCC textbox if BCC checkbox is not checked -function setupBCCTextbox() +function setupBccTextbox() { - var BCCChecked = document.getElementById("identity.bccOthers").checked; - var BCCTextbox = document.getElementById("identity.bccList"); + var bccChecked = document.getElementById("identity.doBcc").checked; + var bccTextbox = document.getElementById("identity.doBccList"); - BCCTextbox.disabled = !BCCChecked; + bccTextbox.disabled = !bccChecked; } // Set up picker settings for Sent Folder diff --git a/mailnews/base/prefs/resources/content/am-copies.xul b/mailnews/base/prefs/resources/content/am-copies.xul index b825d151548..d6a9016654e 100644 --- a/mailnews/base/prefs/resources/content/am-copies.xul +++ b/mailnews/base/prefs/resources/content/am-copies.xul @@ -29,7 +29,6 @@ pref="true" preftype="string" prefattribute="value" prefstring="mail.identity.%identitykey%.stationary_folder"/>