additional fix for #128962. pref UI work for MDN (return receipts)

NOT PART OF THE BUILD (yet)

fix the global prefs to match the 4.x global
prefs so that migration is a no-brainer.  fix the per account
prefs to be correct (wrt server or identity).  fix certain prefs to be
booleans, instead of ints.

r=shuelan, sr=bienvenu, a=shaver
This commit is contained in:
sspitzer%netscape.com 2002-03-13 01:41:10 +00:00
Родитель ef466bf33d
Коммит ed7886c166
8 изменённых файлов: 31 добавлений и 24 удалений

Просмотреть файл

@ -472,6 +472,15 @@ function saveAccount(accountValues, account)
dest.setCharAttribute(slot, typeArray[slot]);
break;
case "bool":
// in some cases
// like for radiogroups of type boolean
// the value will be "false" instead of false
// we need to convert it.
if (typeArray[slot] == "false")
typeArray[slot] = false;
else if (typeArray[slot] == "true")
typeArray[slot] = true;
if (dest.getBoolAttribute(slot) != typeArray[slot])
dest.setBoolAttribute(slot, typeArray[slot]);
break;

Просмотреть файл

@ -55,7 +55,7 @@ function Startup() {
}
function EnableDisableAllowedReceipts() {
if (receiptSend && (receiptSend.getAttribute("value") == 0)) {
if (receiptSend && (receiptSend.getAttribute("value") == "false")) {
notInToCcPref.setAttribute("disabled", "true");
notInToCcLabel.setAttribute("disabled", "true");
outsideDomainPref.setAttribute("disabled", "true");

Просмотреть файл

@ -71,9 +71,9 @@
<vbox id="receiptRequest">
<description>&requestMDN.label;</description>
<radiogroup id="receiptSend" prefstring="mail.receipt.return_some_receipts" oncommand="EnableDisableAllowedReceipts();">
<radio value="0" label="&never.label;"/>
<radio value="1" label="&returnSome.label;"/>
<radiogroup id="receiptSend" preftype="bool" prefstring="mail.mdn.report.enabled" oncommand="EnableDisableAllowedReceipts();">
<radio value="false" label="&never.label;"/>
<radio value="true" label="&returnSome.label;"/>
</radiogroup>
<hbox id="receiptSendIf" class="indent">

Просмотреть файл

@ -40,7 +40,7 @@ function onInit()
requestReceipt = document.getElementById("identity.request_return_receipt_on");
leaveInInbox = document.getElementById("leave_in_inbox");
moveToSent = document.getElementById("move_to_sent");
receiptSend = document.getElementById("identity.return_some_receipts");
receiptSend = document.getElementById("server.mdn_report_enabled");
neverReturn = document.getElementById("never_return");
returnSome = document.getElementById("return_some");
notInToCcPref = document.getElementById("server.mdn_not_in_to_cc");
@ -63,7 +63,7 @@ function onSave()
}
function EnableDisableCustomSettings() {
if (useCustomPrefs && (useCustomPrefs.getAttribute("value") == 0)) {
if (useCustomPrefs && (useCustomPrefs.getAttribute("value") == "false")) {
requestReceipt.setAttribute("disabled", "true");
leaveInInbox.setAttribute("disabled", "true");
moveToSent.setAttribute("disabled", "true");
@ -87,7 +87,7 @@ function EnableDisableCustomSettings() {
function EnableDisableAllowedReceipts() {
if (receiptSend) {
if (!neverReturn.getAttribute("disabled") && (receiptSend.getAttribute("value") != 0)) {
if (!neverReturn.getAttribute("disabled") && (receiptSend.getAttribute("value") != "false")) {
notInToCcPref.removeAttribute("disabled");
notInToCcLabel.removeAttribute("disabled");
outsideDomainPref.removeAttribute("disabled");

Просмотреть файл

@ -38,10 +38,10 @@ Rights Reserved.
<hbox id="prefChoices" align="center">
<radiogroup id="identity.use_custom_prefs" wsm_persist="true" genericattr="true"
preftype="int" prefstring="mail.identity.%identitykey%.use_custom_prefs"
preftype="bool" prefstring="mail.identity.%identitykey%.use_custom_prefs"
oncommand="EnableDisableCustomSettings();">
<radio value="0" label="&useGlobalPrefs.label;"/>
<radio value="1" label="&useCustomPrefs.label;"/>
<radio value="false" label="&useGlobalPrefs.label;"/>
<radio value="true" label="&useCustomPrefs.label;"/>
</radiogroup>
</hbox>
@ -53,7 +53,7 @@ Rights Reserved.
<vbox id="receiptArrive">
<description id="receiptArriveLabel">&receiptArrive.label;</description>
<radiogroup id="server.incorporate_return_receipt" wsm_persist="true" genericattr="true"
preftype="int" prefstring="mail.server.%identitykey%.incorporate_return_receipt">
preftype="int" prefstring="mail.server.%serverkey%.incorporate_return_receipt">
<radio id="leave_in_inbox" value="0" label="&leaveIt.label;"/>
<radio id="move_to_sent" value="1" label="&moveToSent.label;"/>
</radiogroup>
@ -61,11 +61,11 @@ Rights Reserved.
<vbox id="receiptRequest">
<description id="receiptRequestLabel">&requestMDN.label;</description>
<radiogroup id="identity.return_some_receipts" wsm_persist="true" genericattr="true"
preftype="int" prefstring="mail.identity.%identitykey%.return_some_receipts"
<radiogroup id="server.mdn_report_enabled" wsm_persist="true" genericattr="true"
preftype="bool" prefstring="mail.server.%serverkey%.mdn_report_enabled"
oncommand="EnableDisableAllowedReceipts();">
<radio id="never_return" value="0" label="&never.label;"/>
<radio id="return_some" value="1" label="&returnSome.label;"/>
<radio id="never_return" value="false" label="&never.label;"/>
<radio id="return_some" value="true" label="&returnSome.label;"/>
</radiogroup>
<hbox id="receiptSendIf" class="indent">
@ -75,7 +75,7 @@ Rights Reserved.
<row align="center">
<label id="notInToCcLabel">&notInToCc.label;</label>
<menulist id="server.mdn_not_in_to_cc" wsm_persist="true" genericattr="true"
preftype="int" prefstring="mail.server.%identitykey%.mdn_not_in_to_cc">
preftype="int" prefstring="mail.server.%serverkey%.mdn_not_in_to_cc">
<menupopup>
<menuitem value="0" label="&neverSend.label;"/>
<menuitem value="1" label="&alwaysSend.label;"/>
@ -86,7 +86,7 @@ Rights Reserved.
<row align="center">
<label id="outsideDomainLabel">&outsideDomain.label;</label>
<menulist id="server.mdn_outside_domain" wsm_persist="true" genericattr="true"
preftype="int" prefstring="mail.server.%identitykey%.mdn_outside_domain">
preftype="int" prefstring="mail.server.%serverkey%.mdn_outside_domain">
<menupopup>
<menuitem value="0" label="&neverSend.label;"/>
<menuitem value="1" label="&alwaysSend.label;"/>
@ -97,7 +97,7 @@ Rights Reserved.
<row align="center">
<label id="otherCasesLabel">&otherCases.label;</label>
<menulist id="server.mdn_other" wsm_persist="true" genericattr="true"
preftype="int" prefstring="mail.server.%identitykey%.mdn_other">
preftype="int" prefstring="mail.server.%serverkey%.mdn_other">
<menupopup>
<menuitem value="0" label="&neverSend.label;"/>
<menuitem value="1" label="&alwaysSend.label;"/>

Просмотреть файл

@ -2,13 +2,13 @@
* default prefs for mdn
*/
pref("mail.identity.default.use_custom_prefs", 0); // 0: Use global 1: Use custom
pref("mail.identity.default.use_custom_prefs", true); // false: Use global true: Use custom
pref("mail.identity.default.request_return_receipt_on", false);
pref("mail.server.default.incorporate_return_receipt", 0); // 0: Inbox/filter 1: Sent folder
pref("mail.identity.default.return_some_receipts", 1); // 0: Never return receipts 1: Return some receipts
pref("mail.server.default.mdn_report_enabled", false); // false: Never return receipts true: Return some receipts
pref("mail.server.default.mdn_not_in_to_cc", 2); // 0: Never 1: Always 2: Ask me 3: Denial
pref("mail.server.default.mdn_outside_domain", 2);

Просмотреть файл

@ -141,8 +141,7 @@ pref("mail.incorporate.return_receipt", 0); // 0: Inbox/filter 1: Sen
pref("mail.request.return_receipt", 2); // 1: DSN 2: MDN 3: Both
pref("mail.receipt.request_header_type", 0); // 0: MDN-DNT header 1: RRT header 2: Both (MC)
pref("mail.receipt.request_return_receipt_on", false);
pref("mail.receipt.return_some_receipts", 1); // 0: Never send 1: Send sometimes
pref("mail.mdn.report.enabled", false); // false: Never send true: Send sometimes
pref("news.default_cc", "");
pref("news.default_fcc", ""); // mailbox:URL or Imap://Host/OnlineFolderName

Просмотреть файл

@ -141,8 +141,7 @@ pref("mail.incorporate.return_receipt", 0); // 0: Inbox/filter 1: Sen
pref("mail.request.return_receipt", 2); // 1: DSN 2: MDN 3: Both
pref("mail.receipt.request_header_type", 0); // 0: MDN-DNT header 1: RRT header 2: Both (MC)
pref("mail.receipt.request_return_receipt_on", false);
pref("mail.receipt.return_some_receipts", 1); // 0: Never send 1: Send sometimes
pref("mail.mdn.report.enabled", false); // false: Never send true: Send sometimes
pref("news.default_cc", "");
pref("news.default_fcc", ""); // mailbox:URL or Imap://Host/OnlineFolderName