Monotone-Parent: e3c366d0f994c28dc0f424d8712c67980170a6c1

Monotone-Revision: 77c8b4de9ced789f1bc229519470e879b316a239

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2008-10-15T15:07:17
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2008-10-15 15:07:17 +00:00
parent 09d42ba770
commit 993fc69f81
2 changed files with 13 additions and 4 deletions

View File

@@ -241,8 +241,9 @@ function ml_lowlight(sender) {
function onUnload(event) {
var url = ApplicationBaseURL + encodeURI(Mailer.currentMailbox) + "/expunge";
new Ajax.Request(url, {
asynchronous: false,
method: 'get',
onFailure: function(transport) {
log("Can't expunge current folder: " + transport.status);
@@ -1439,13 +1440,20 @@ function openInbox(node) {
function initMailer(event) {
if (!$(document.body).hasClassName("popup")) {
// initDnd();
//initDnd();
initMailboxTree();
initMessageCheckTimer();
/* Perform an expunge when leaving the webmail */
Event.observe(document, "keydown", onDocumentKeydown);
Event.observe(window, "beforeunload", onUnload);
}
if (isSafari()) {
$('calendarBannerLink').observe("click", onUnload);
$('contactsBannerLink').observe("click", onUnload);
$('logoff').observe("click", onUnload);
}
else
Event.observe(window, "beforeunload", onUnload);
}
Event.observe(window, "resize", onWindowResize);
onWindowResize(null);

View File

@@ -268,6 +268,7 @@ function openMailTo(senderMailTo) {
function deleteDraft(url) {
/* this is called by UIxMailEditor with window.opener */
new Ajax.Request(url, {
asynchronous: false,
method: 'post',
onFailure: function(transport) {
log("draftDeleteCallback: problem during ajax request: " + transport.status);