6fa5b84ecd
Monotone-Revision: 69df71bbd74fc7ccbfdfda4d8e386bd2d00ce08a Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2008-09-02T18:44:48 Monotone-Branch: ca.inverse.sogo
48 lines
1.3 KiB
JavaScript
48 lines
1.3 KiB
JavaScript
/* -*- Mode: java; tab-width: 2; c-tab-always-indent: t; indent-tabs-mode: t; c-basic-offset: 2 -*- */
|
|
|
|
function onPrintCurrentMessage(event) {
|
|
window.print();
|
|
|
|
preventDefault(event);
|
|
}
|
|
|
|
function initPopupMailer(event) {
|
|
configureLinksInMessage();
|
|
resizeMailContent();
|
|
}
|
|
|
|
function onICalendarButtonClick(event) {
|
|
var link = $("iCalendarAttachment").value;
|
|
if (link) {
|
|
var urlstr = link + "/" + this.action;
|
|
var currentMsg;
|
|
if (window.opener && window.opener.open && !window.opener.closed && window.messageUID) {
|
|
var c = window.opener;
|
|
window.opener.triggerAjaxRequest(urlstr,
|
|
window.opener.ICalendarButtonCallback,
|
|
window.messageUID);
|
|
}
|
|
}
|
|
else
|
|
log("no link");
|
|
}
|
|
|
|
function onMenuDeleteMessage(event) {
|
|
if (window.opener && window.opener.open && !window.opener.closed) {
|
|
var rowId_index = window.name.search(/[0-9]+$/);
|
|
var rowId = window.name.substr(rowId_index);
|
|
var messageId = window.opener.Mailer.currentMailbox + "/" + rowId;
|
|
var url = ApplicationBaseURL + messageId + "/trash";
|
|
|
|
window.opener.deleteMessageWithDelay(url,
|
|
rowId,
|
|
window.opener.Mailer.currentMailbox,
|
|
messageId);
|
|
}
|
|
|
|
window.close();
|
|
return false;
|
|
}
|
|
|
|
FastInit.addOnLoad(initPopupMailer);
|