- #687: Don't lose authentication when editing a long mail -FRU
- #688: From name in the sending form -FRU
- #703: Fix management of mail adresses containing '+' -ALK
- - #720: Save not sent mail at exit -FRU
+ - #720: Save not sent mail -FRU
* Lists:
- #700: Fix several encoding issues -FRU
return true;
}
+ function saveMessage() {
+ var form = document.forms.form_mail;
+ var toc = "";
+ var ccc = "";
+ for (var i = 0 ; i < form['to_contacts[]'].length ; ++i) {
+ toc += form['to_contacts[]'].options[i].value + ";";
+ }
+ for (var i = 0 ; i < form['cc_contacts[]'].length ; ++i) {
+ ccc += form['cc_contacts[]'].options[i].value + ";";
+ }
+ $.post(platal_baseurl + "emails/send",
+ { save: true,
+ from: form.from.value,
+ to_contacts: toc,
+ cc_contacts: ccc,
+ contenu: form.contenu.value,
+ to: form.to.value,
+ sujet: form.sujet.value,
+ cc: form.cc.value,
+ bcc: form.bcc.value });
+ }
+
var doAuth = true;
function _keepAuth() {
doAuth = true;
function keepAuth() {
if (doAuth) {
- Ajax.update_html(null, "login", null);
+ saveMessage();
doAuth = false;
setTimeout("_keepAuth()", 10000);
}
if (sent) {
return true;
}
- var form = document.forms.form_mail;
- var toc = "";
- var ccc = "";
- for (var i = 0 ; i < form['to_contacts[]'].length ; ++i) {
- toc += form['to_contacts[]'].options[i].value + ";";
- }
- for (var i = 0 ; i < form['cc_contacts[]'].length ; ++i) {
- ccc += form['cc_contacts[]'].options[i].value + ";";
- }
- $.post(platal_baseurl + "emails/send",
- { save: true,
- from: form.from.value,
- to_contacts: toc,
- cc_contacts: ccc,
- contenu: form.contenu.value,
- to: form.to.value,
- sujet: form.sujet.value,
- cc: form.cc.value,
- bcc: form.bcc.value });
+ saveMessage();
return true;
});
{/literal}