mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-15 18:28:51 +00:00
merge of '6a4824550c190457f2e4b04575ebdecbfda0908d'
and 'b0e35bdbcaa9fb45b5f60a9d61d40f8ee83c0ffc' Monotone-Parent: 6a4824550c190457f2e4b04575ebdecbfda0908d Monotone-Parent: b0e35bdbcaa9fb45b5f60a9d61d40f8ee83c0ffc Monotone-Revision: 573e35d1eb013cb0298d8cac99d4b4916c2a085c Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-11-05T21:26:29 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1
NEWS
1
NEWS
@@ -17,6 +17,7 @@
|
||||
- support for resizable columns in tables;
|
||||
- improved support for multiple selection in tables and lists;
|
||||
- improved IE7 and Safari support: attendees selector, email file attachments;
|
||||
- changed look of message composition window to Thunderbird 2.0;
|
||||
- countless bugfixes;
|
||||
|
||||
0.9.0-20070824
|
||||
|
||||
@@ -161,39 +161,36 @@
|
||||
|
||||
- (NSString *) messageRowStyleClass
|
||||
{
|
||||
return [self isMessageDeleted]
|
||||
? @"mailer_listcell_deleted"
|
||||
: @"mailer_listcell_regular";
|
||||
NSString *rowClass;
|
||||
|
||||
rowClass = [self isMessageDeleted]? @"mailer_listcell_deleted" : @"mailer_listcell_regular";
|
||||
|
||||
if (![self isMessageRead])
|
||||
rowClass = [rowClass stringByAppendingString: @" mailer_unreadmail"];
|
||||
|
||||
return rowClass;
|
||||
}
|
||||
|
||||
- (NSString *) messageSubjectCellStyleClass
|
||||
{
|
||||
NSArray *flags;
|
||||
NSString *cellClass;
|
||||
NSString *cellClass = @"messageSubjectColumn ";
|
||||
|
||||
flags = [[self message] valueForKey:@"flags"];
|
||||
|
||||
if ([flags containsObject: @"seen"])
|
||||
if ([flags containsObject: @"answered"])
|
||||
{
|
||||
if ([flags containsObject: @"answered"])
|
||||
{
|
||||
if ([flags containsObject: @"$forwarded"])
|
||||
cellClass = @"mailer_forwardedrepliedmailsubject";
|
||||
else
|
||||
cellClass = @"mailer_repliedmailsubject";
|
||||
}
|
||||
else if ([flags containsObject: @"$forwarded"])
|
||||
cellClass = @"mailer_forwardedmailsubject";
|
||||
if ([flags containsObject: @"$forwarded"])
|
||||
cellClass = [cellClass stringByAppendingString: @"mailer_forwardedrepliedmailsubject"];
|
||||
else
|
||||
cellClass = @"mailer_readmailsubject";
|
||||
cellClass = [cellClass stringByAppendingString: @"mailer_repliedmailsubject"];
|
||||
}
|
||||
else if ([flags containsObject: @"$forwarded"])
|
||||
cellClass = [cellClass stringByAppendingString: @"mailer_forwardedmailsubject"];
|
||||
else
|
||||
cellClass = @"mailer_unreadmailsubject";
|
||||
cellClass = [cellClass stringByAppendingString: @"mailer_readmailsubject"];
|
||||
|
||||
return cellClass;
|
||||
// return ([self isMessageRead]
|
||||
// ? @"mailer_readmailsubject"
|
||||
// : @"mailer_unreadmailsubject");
|
||||
}
|
||||
|
||||
- (BOOL) hasMessageAttachment
|
||||
|
||||
@@ -243,9 +243,14 @@ TD.mailer_readmailsubject
|
||||
padding-left: 20px !important;
|
||||
}
|
||||
|
||||
TD.mailer_unreadmailsubject
|
||||
TR.mailer_unreadmail TD
|
||||
{
|
||||
background-image: url(icon-new.png) !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
TR.mailer_unreadmail TD.messageSubjectColumn
|
||||
{
|
||||
background-image: url(icon-new.png);
|
||||
background-repeat: no-repeat !important;
|
||||
background-position: 0px 0px !important;
|
||||
padding-left: 20px !important;
|
||||
|
||||
@@ -83,45 +83,36 @@ function onMenuSharing(event) {
|
||||
/* mail list DOM changes */
|
||||
|
||||
function markMailInWindow(win, msguid, markread) {
|
||||
var msgDiv;
|
||||
|
||||
msgDiv = win.$("div_" + msguid);
|
||||
if (msgDiv) {
|
||||
var row = win.$("row_" + msguid);
|
||||
var subjectCell = win.$("div_" + msguid);
|
||||
if (row && subjectCell) {
|
||||
if (markread) {
|
||||
msgDiv.removeClassName("mailer_unreadmailsubject");
|
||||
msgDiv.addClassName("mailer_readmailsubject");
|
||||
msgDiv = win.$("unreaddiv_" + msguid);
|
||||
if (msgDiv)
|
||||
{
|
||||
msgDiv.setAttribute("class", "mailerUnreadIcon");
|
||||
msgDiv.setAttribute("id", "readdiv_" + msguid);
|
||||
msgDiv.setAttribute("src", ResourcesURL + "/icon_read.gif");
|
||||
msgDiv.setAttribute("onclick", "mailListMarkMessage(this,"
|
||||
+ " 'markMessageUnread', " + msguid
|
||||
+ ", false);"
|
||||
+" return false;");
|
||||
var title = msgDiv.getAttribute("title-markunread");
|
||||
if (title)
|
||||
msgDiv.setAttribute("title", title);
|
||||
}
|
||||
row.removeClassName("mailer_unreadmail");
|
||||
subjectCell.addClassName("mailer_readmailsubject");
|
||||
var img = win.$("unreaddiv_" + msguid);
|
||||
if (img) {
|
||||
img.removeClassName("mailerUnreadIcon");
|
||||
img.addClassName("mailerReadIcon");
|
||||
img.setAttribute("id", "readdiv_" + msguid);
|
||||
img.setAttribute("src", ResourcesURL + "/icon_read.gif");
|
||||
var title = img.getAttribute("title-markunread");
|
||||
if (title)
|
||||
img.setAttribute("title", title);
|
||||
}
|
||||
}
|
||||
else {
|
||||
msgDiv.removeClassName('mailer_readmailsubject');
|
||||
msgDiv.addClassName('mailer_unreadmailsubject');
|
||||
msgDiv = win.$("readdiv_" + msguid);
|
||||
if (msgDiv)
|
||||
{
|
||||
msgDiv.setAttribute("class", "mailerReadIcon");
|
||||
msgDiv.setAttribute("id", "unreaddiv_" + msguid);
|
||||
msgDiv.setAttribute("src", ResourcesURL + "/icon_unread.gif");
|
||||
msgDiv.setAttribute("onclick", "mailListMarkMessage(this,"
|
||||
+ " 'markMessageRead', " + msguid
|
||||
+ ", true);"
|
||||
+" return false;");
|
||||
var title = msgDiv.getAttribute("title-markread");
|
||||
if (title)
|
||||
msgDiv.setAttribute("title", title);
|
||||
}
|
||||
row.addClassName("mailer_unreadmail");
|
||||
subjectCell.removeClassName('mailer_readmailsubject');
|
||||
var img = win.$("readdiv_" + msguid);
|
||||
if (img) {
|
||||
img.removeClassName("mailerReadIcon");
|
||||
img.addClassName("mailerUnreadIcon");
|
||||
img.setAttribute("id", "unreaddiv_" + msguid);
|
||||
img.setAttribute("src", ResourcesURL + "/icon_unread.gif");
|
||||
var title = img.getAttribute("title-markread");
|
||||
if (title)
|
||||
img.setAttribute("title", title);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -161,25 +152,36 @@ function openMessageWindowsForSelection(action, firstOnly) {
|
||||
}
|
||||
|
||||
function mailListMarkMessage(event) {
|
||||
var http = createHTTPClient();
|
||||
var url = ApplicationBaseURL + currentMailbox + "/" + msguid + "/" + action;
|
||||
|
||||
if (http) {
|
||||
// TODO: add parameter to signal that we are only interested in OK
|
||||
http.open("POST", url, false /* not async */);
|
||||
http.send("");
|
||||
if (http.status != 200) {
|
||||
// TODO: refresh page?
|
||||
alert("Message Mark Failed: " + http.statusText);
|
||||
window.location.reload();
|
||||
}
|
||||
else {
|
||||
markMailInWindow(window, msguid, markread);
|
||||
}
|
||||
var msguid = this.id.split('_')[1];
|
||||
var action;
|
||||
var markread;
|
||||
if ($(this).hasClassName('mailerUnreadIcon')) {
|
||||
action = 'markMessageRead';
|
||||
markread = true;
|
||||
}
|
||||
else {
|
||||
window.location.href = url;
|
||||
action = 'markMessageUnread';
|
||||
markread = false;
|
||||
}
|
||||
var url = ApplicationBaseURL + currentMailbox + "/" + msguid + "/" + action;
|
||||
|
||||
var data = { "window": window, "msguid": msguid, "markread": markread };
|
||||
triggerAjaxRequest(url, mailListMarkMessageCallback, data);
|
||||
|
||||
preventDefault(event);
|
||||
return false;
|
||||
}
|
||||
|
||||
function mailListMarkMessageCallback(http) {
|
||||
if (http.readyState == 4)
|
||||
if (isHttpStatus204(http.status)) {
|
||||
var data = http.callbackData;
|
||||
markMailInWindow(data["window"], data["msguid"], data["markread"]);
|
||||
}
|
||||
else {
|
||||
alert("Message Mark Failed (" + http.status + "): " + http.statusText);
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
/* maillist row highlight */
|
||||
@@ -210,7 +212,7 @@ function deleteSelectedMessages(sender) {
|
||||
var rowIds = messageList.getSelectedRowsId();
|
||||
|
||||
for (var i = 0; i < rowIds.length; i++) {
|
||||
var url, http;
|
||||
var url;
|
||||
var rowId = rowIds[i].substr(4);
|
||||
var messageId = currentMailbox + "/" + rowId;
|
||||
url = ApplicationBaseURL + messageId + "/trash";
|
||||
@@ -1054,7 +1056,7 @@ function configureMessageListBodyEvents(table) {
|
||||
Event.observe(cell, "dblclick", onMessageDoubleClick.bindAsEventListener(cell));
|
||||
else if (j == 4) {
|
||||
var img = cell.childNodesWithTag("img")[0];
|
||||
Event.observe(img, "click", mailListMarkMessage);
|
||||
Event.observe(img, "click", mailListMarkMessage.bindAsEventListener(img));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1351,7 +1353,7 @@ function onMenuCreateFolder(event) {
|
||||
var name = window.prompt(labels["Name :"], "");
|
||||
if (name && name.length > 0) {
|
||||
var folderID = document.menuTarget.getAttribute("dataname");
|
||||
var urlstr = URLForFolderID(folderID) + "/createFolder?name=" + name; log ("create " + urlstr);
|
||||
var urlstr = URLForFolderID(folderID) + "/createFolder?name=" + name;
|
||||
triggerAjaxRequest(urlstr, folderOperationCallback);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user