mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-06 22:08:51 +00:00
Monotone-Parent: d730814de50b7c4fd0fa165b4b6e02e968ff60ef
Monotone-Revision: 148caf2ae66d2024b6008a2633e9145890921239 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-09-01T20:27:45 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -414,6 +414,16 @@ function initMailAccounts() {
|
||||
}
|
||||
$("actSignature").observe("click", onMailIdentitySignatureClick);
|
||||
displayMailAccount(mailAccounts[0], true);
|
||||
|
||||
info = $("returnReceiptsInfo");
|
||||
inputs = info.getElementsByTagName("input");
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
$(inputs[i]).observe("change", onMailReceiptInfoChange);
|
||||
}
|
||||
inputs = info.getElementsByTagName("select");
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
$(inputs[i]).observe("change", onMailReceiptActionChange);
|
||||
}
|
||||
}
|
||||
|
||||
function onMailAccountInfoChange(event) {
|
||||
@@ -432,6 +442,31 @@ function onMailIdentityInfoChange(event) {
|
||||
hasChanged.value = "1";
|
||||
}
|
||||
|
||||
function onMailReceiptInfoChange(event) {
|
||||
if (!this.mailAccount["receipts"]) {
|
||||
this.mailAccount["receipts"] = {};
|
||||
}
|
||||
var keyName = this.name.cssIdToHungarianId();
|
||||
this.mailAccount["receipts"][keyName] = this.value;
|
||||
|
||||
var popupIds = [ "receipt-non-recipient-action",
|
||||
"receipt-outside-domain-action",
|
||||
"receipt-any-action" ];
|
||||
var receiptActionsDisable = (this.value == "ignore");
|
||||
for (var i = 0; i < popupIds.length; i++) {
|
||||
var actionPopup = $(popupIds[i]);
|
||||
actionPopup.disabled = receiptActionsDisable;
|
||||
}
|
||||
}
|
||||
|
||||
function onMailReceiptActionChange(event) {
|
||||
if (!this.mailAccount["receipts"]) {
|
||||
this.mailAccount["receipts"] = {};
|
||||
}
|
||||
var keyName = this.name.cssIdToHungarianId();
|
||||
this.mailAccount["receipts"][keyName] = this.value;
|
||||
}
|
||||
|
||||
function onMailIdentitySignatureClick(event) {
|
||||
if (!this.readOnly) {
|
||||
var dialogId = "signatureDialog";
|
||||
@@ -526,20 +561,26 @@ function onMailAccountEntryClick(event) {
|
||||
}
|
||||
|
||||
function displayMailAccount(mailAccount, readOnly) {
|
||||
var editor = $("mailAccountEditor");
|
||||
var inputs = editor.getElementsByTagName("input");
|
||||
var fieldSet = $("accountInfo");
|
||||
var inputs = fieldSet.getElementsByTagName("input");
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
inputs[i].disabled = readOnly;
|
||||
inputs[i].mailAccount = mailAccount;
|
||||
}
|
||||
fieldSet = $("identityInfo");
|
||||
inputs = fieldSet.getElementsByTagName("input");
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
inputs[i].disabled = readOnly;
|
||||
inputs[i].mailAccount = mailAccount;
|
||||
}
|
||||
|
||||
var encryption = "none";
|
||||
var form = $("mainForm");
|
||||
|
||||
var encryption = "none";
|
||||
var encRadioValues = [ "none", "ssl", "tls" ];
|
||||
if (mailAccount["encryption"]) {
|
||||
encryption = mailAccount["encryption"];
|
||||
}
|
||||
var form = $("mainForm");
|
||||
form.setRadioValue("encryption", encRadioValues.indexOf(encryption));
|
||||
|
||||
var port;
|
||||
@@ -567,6 +608,34 @@ function displayMailAccount(mailAccount, readOnly) {
|
||||
$("email").value = identity["email"] || "";
|
||||
|
||||
displayAccountSignature(mailAccount);
|
||||
|
||||
var receiptAction = "ignore";
|
||||
var receiptActionValues = [ "ignore", "allow" ];
|
||||
if (mailAccount["receipts"] && mailAccount["receipts"]["receiptAction"]) {
|
||||
receiptAction = mailAccount["receipts"]["receiptAction"];
|
||||
}
|
||||
for (var i = 0; i < receiptActionValues.length; i++) {
|
||||
var keyName = "receipt-action-" + receiptActionValues[i];
|
||||
var input = $(keyName);
|
||||
input.mailAccount = mailAccount;
|
||||
}
|
||||
form.setRadioValue("receipt-action",
|
||||
receiptActionValues.indexOf(receiptAction));
|
||||
var popupIds = [ "receipt-non-recipient-action",
|
||||
"receipt-outside-domain-action",
|
||||
"receipt-any-action" ];
|
||||
var receiptActionsDisable = (receiptAction == "ignore");
|
||||
for (var i = 0; i < popupIds.length; i++) {
|
||||
var actionPopup = $(popupIds[i]);
|
||||
actionPopup.disabled = receiptActionsDisable;
|
||||
var settingValue = "ignore";
|
||||
var settingName = popupIds[i].cssIdToHungarianId();
|
||||
if (mailAccount["receipts"] && mailAccount["receipts"][settingName]) {
|
||||
settingValue = mailAccount["receipts"][settingName];
|
||||
}
|
||||
actionPopup.value = settingValue;
|
||||
actionPopup.mailAccount = mailAccount;
|
||||
}
|
||||
}
|
||||
|
||||
function displayAccountSignature(mailAccount) {
|
||||
|
||||
Reference in New Issue
Block a user