mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-08 16:33:22 +00:00
Monotone-Parent: 2b043d9497bc939d7078d10d38953e92948da5aa
Monotone-Revision: ff9ea5325e680d04c8672e78e3bd74f60d7316c1 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-09-14T17:44:39 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -331,6 +331,19 @@ INPUT#loadImagesButton
|
||||
right: 1em;
|
||||
}
|
||||
|
||||
#signedImage
|
||||
{
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
.popup #signedImage
|
||||
{
|
||||
top: 54px;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
TABLE.mailer_fieldtable
|
||||
{ top: 0px;
|
||||
left: 0px;
|
||||
|
||||
@@ -947,6 +947,7 @@ function loadMessage(idx) {
|
||||
}
|
||||
|
||||
configureLoadImagesButton();
|
||||
configureSignatureFlagImage();
|
||||
}
|
||||
|
||||
function configureLoadImagesButton() {
|
||||
@@ -965,6 +966,30 @@ function configureLoadImagesButton() {
|
||||
}
|
||||
}
|
||||
|
||||
function configureSignatureFlagImage() {
|
||||
var signedPart = $("signedMessage");
|
||||
if (signedPart) {
|
||||
var loadImagesButton = $("loadImagesButton");
|
||||
var parentNode = loadImagesButton.parentNode;
|
||||
var valid = parseInt(signedPart.getAttribute("valid"));
|
||||
var flagImage;
|
||||
var error = null;
|
||||
if (valid) {
|
||||
flagImage = "signature-ok.png";
|
||||
} else {
|
||||
flagImage = "signature-not-ok.png";
|
||||
error = signedPart.getAttribute("error");
|
||||
}
|
||||
var attrs = { src: ResourcesURL + "/" + flagImage };
|
||||
if (error) {
|
||||
attrs["title"] = error;
|
||||
}
|
||||
var newImg = createElement("img", "signedImage", null,
|
||||
null, attrs);
|
||||
loadImagesButton.parentNode.insertBefore(newImg, loadImagesButton.nextSibling);
|
||||
}
|
||||
}
|
||||
|
||||
function configureLinksInMessage() {
|
||||
var messageDiv = $('messageContent');
|
||||
var mailContentDiv = document.getElementsByClassName('mailer_mailcontent',
|
||||
@@ -1190,6 +1215,7 @@ function messageCallback(http) {
|
||||
configureLinksInMessage();
|
||||
resizeMailContent();
|
||||
configureLoadImagesButton();
|
||||
configureSignatureFlagImage();
|
||||
|
||||
if (http.callbackData) {
|
||||
var cachedMessage = new Array();
|
||||
|
||||
@@ -1,57 +1,58 @@
|
||||
/* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
|
||||
function onPrintCurrentMessage(event) {
|
||||
window.print();
|
||||
window.print();
|
||||
|
||||
preventDefault(event);
|
||||
preventDefault(event);
|
||||
}
|
||||
|
||||
function initPopupMailer(event) {
|
||||
configureLinksInMessage();
|
||||
resizeMailContent();
|
||||
configureLinksInMessage();
|
||||
resizeMailContent();
|
||||
|
||||
var loadImagesButton = $("loadImagesButton");
|
||||
if (loadImagesButton)
|
||||
loadImagesButton.observe("click",
|
||||
onMessageLoadImages.bindAsEventListener(loadImagesButton));
|
||||
var loadImagesButton = $("loadImagesButton");
|
||||
if (loadImagesButton)
|
||||
loadImagesButton.observe("click",
|
||||
onMessageLoadImages.bindAsEventListener(loadImagesButton));
|
||||
|
||||
configureLoadImagesButton();
|
||||
configureLoadImagesButton();
|
||||
configureSignatureFlagImage();
|
||||
}
|
||||
|
||||
function onMessageLoadImages(event) {
|
||||
var msguid = window.opener.Mailer.currentMessages[window.opener.Mailer.currentMailbox];
|
||||
var url = (window.opener.ApplicationBaseURL + window.opener.encodeURI(window.opener.Mailer.currentMailbox) + "/"
|
||||
+ msguid + "/view?noframe=1&unsafe=1");
|
||||
document.messageAjaxRequest
|
||||
= triggerAjaxRequest(url, messageCallback, msguid);
|
||||
var msguid = window.opener.Mailer.currentMessages[window.opener.Mailer.currentMailbox];
|
||||
var url = (window.opener.ApplicationBaseURL + window.opener.encodeURI(window.opener.Mailer.currentMailbox) + "/"
|
||||
+ msguid + "/view?noframe=1&unsafe=1");
|
||||
document.messageAjaxRequest
|
||||
= triggerAjaxRequest(url, messageCallback, msguid);
|
||||
}
|
||||
|
||||
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);
|
||||
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");
|
||||
else
|
||||
log("no link");
|
||||
}
|
||||
|
||||
function onMenuDeleteMessage(event) {
|
||||
if (window.opener && window.opener.open && !window.opener.closed) {
|
||||
var url = ApplicationBaseURL + encodeURI(mailboxName) + "/deleteMessages";
|
||||
var path = mailboxName + "/" + messageName;
|
||||
|
||||
window.opener.deleteMessageWithDelay(url, messageName, mailboxName, path);
|
||||
}
|
||||
if (window.opener && window.opener.open && !window.opener.closed) {
|
||||
var url = ApplicationBaseURL + encodeURI(mailboxName) + "/deleteMessages";
|
||||
var path = mailboxName + "/" + messageName;
|
||||
|
||||
window.opener.deleteMessageWithDelay(url, messageName, mailboxName, path);
|
||||
}
|
||||
|
||||
window.close();
|
||||
return false;
|
||||
window.close();
|
||||
return false;
|
||||
}
|
||||
|
||||
document.observe("dom:loaded", initPopupMailer);
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Reference in New Issue
Block a user