2009-07-19 18:41:42 +02:00
|
|
|
/* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2008-08-28 16:48:45 +02:00
|
|
|
|
2007-08-08 23:36:17 +02:00
|
|
|
function onPrintCurrentMessage(event) {
|
2009-09-14 19:44:39 +02:00
|
|
|
window.print();
|
2007-08-08 23:36:17 +02:00
|
|
|
|
2009-09-14 19:44:39 +02:00
|
|
|
preventDefault(event);
|
2007-08-08 23:36:17 +02:00
|
|
|
}
|
2007-08-15 00:09:20 +02:00
|
|
|
|
2007-10-27 00:17:29 +02:00
|
|
|
function initPopupMailer(event) {
|
2009-09-14 19:44:39 +02:00
|
|
|
configureLinksInMessage();
|
|
|
|
resizeMailContent();
|
2008-10-06 19:17:43 +02:00
|
|
|
|
2009-09-14 19:44:39 +02:00
|
|
|
configureLoadImagesButton();
|
|
|
|
configureSignatureFlagImage();
|
2010-04-16 23:44:26 +02:00
|
|
|
|
|
|
|
window.messageUID = mailboxName + "/" + messageName;
|
2010-09-01 22:27:45 +02:00
|
|
|
|
|
|
|
handleReturnReceipt();
|
2008-10-06 19:17:43 +02:00
|
|
|
}
|
|
|
|
|
2008-08-15 03:48:07 +02:00
|
|
|
function onICalendarButtonClick(event) {
|
2009-09-14 19:44:39 +02:00
|
|
|
var link = $("iCalendarAttachment").value;
|
|
|
|
if (link) {
|
|
|
|
var urlstr = link + "/" + this.action;
|
|
|
|
if (window.opener && window.opener.open && !window.opener.closed && window.messageUID) {
|
|
|
|
var c = window.opener;
|
|
|
|
window.opener.triggerAjaxRequest(urlstr,
|
|
|
|
window.opener.ICalendarButtonCallback,
|
|
|
|
window.messageUID);
|
|
|
|
}
|
2008-08-15 03:48:07 +02:00
|
|
|
}
|
2009-09-14 19:44:39 +02:00
|
|
|
else
|
|
|
|
log("no link");
|
2008-08-15 03:48:07 +02:00
|
|
|
}
|
2007-12-10 16:56:13 +01:00
|
|
|
|
2008-08-15 03:48:07 +02:00
|
|
|
function onMenuDeleteMessage(event) {
|
2009-09-14 19:44:39 +02:00
|
|
|
if (window.opener && window.opener.open && !window.opener.closed) {
|
2010-04-07 22:26:15 +02:00
|
|
|
var url = ApplicationBaseURL + encodeURI(mailboxName) + "/batchDelete";
|
2009-09-14 19:44:39 +02:00
|
|
|
var path = mailboxName + "/" + messageName;
|
|
|
|
|
|
|
|
window.opener.deleteMessageWithDelay(url, messageName, mailboxName, path);
|
|
|
|
}
|
2007-12-10 16:56:13 +01:00
|
|
|
|
2009-09-14 19:44:39 +02:00
|
|
|
window.close();
|
|
|
|
return false;
|
2007-12-10 16:56:13 +01:00
|
|
|
}
|
|
|
|
|
2009-03-12 22:09:14 +01:00
|
|
|
document.observe("dom:loaded", initPopupMailer);
|