mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-30 02:22:47 +00:00
We now expunge the current selected mailbox whenver we 'leave' the mail module.
Monotone-Parent: 822260d0260bcf1547f7d38fe5a673fcdcb589ad Monotone-Revision: addd7d5e87d3a58601c005b2b25baaecc4ac4ece Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2008-10-14T17:36:04 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -239,6 +239,19 @@ function ml_lowlight(sender) {
|
||||
}
|
||||
|
||||
|
||||
function onUnload(event) {
|
||||
var url = ApplicationBaseURL + encodeURI(Mailer.currentMailbox) + "/expunge";
|
||||
|
||||
new Ajax.Request(url, {
|
||||
method: 'get',
|
||||
onFailure: function(transport) {
|
||||
log("Can't expunge current folder: " + transport.status);
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* bulk delete of messages */
|
||||
|
||||
function onDocumentKeydown(event) {
|
||||
@@ -1431,6 +1444,7 @@ function initMailer(event) {
|
||||
initMessageCheckTimer();
|
||||
|
||||
Event.observe(document, "keydown", onDocumentKeydown);
|
||||
Event.observe(window, "beforeunload", onUnload);
|
||||
}
|
||||
|
||||
Event.observe(window, "resize", onWindowResize);
|
||||
|
||||
Reference in New Issue
Block a user