From: wolfgang Date: Mon, 29 Oct 2007 15:45:52 +0000 (+0000) Subject: git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1204 d1b88da0-ebda-0310... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb6e3249fa6e5a971ed55cc34402cb4ea83470d1;p=scalable-opengroupware.org git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1204 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOPE/GDLContentStore/GNUmakefile b/SOPE/GDLContentStore/GNUmakefile index 85b394e8..5de46243 100644 --- a/SOPE/GDLContentStore/GNUmakefile +++ b/SOPE/GDLContentStore/GNUmakefile @@ -1,6 +1,6 @@ # GNUstep makefiles -include ../../../config.make +include ../../config.make include $(GNUSTEP_MAKEFILES)/common.make include ./Version diff --git a/SOPE/NGCards/CardElement.m b/SOPE/NGCards/CardElement.m index 45c9180f..cc369755 100644 --- a/SOPE/NGCards/CardElement.m +++ b/SOPE/NGCards/CardElement.m @@ -25,6 +25,10 @@ #import #import +#import +#import +#import + #import "NSArray+NGCards.h" #import "NSDictionary+NGCards.h" #import "CardVersitRenderer.h" @@ -245,12 +249,30 @@ - (NSString *) value: (unsigned int) anInt { - NSString *value; + NSString *realValue, *value, *encoding; if ([values count] <= anInt) value = @""; else - value = [values objectAtIndex: anInt]; + { + realValue = [values objectAtIndex: anInt]; + encoding = [[self value: 0 ofAttribute: @"encoding"] lowercaseString]; + if ([encoding length]) + { + if ([encoding isEqualToString: @"quoted-printable"]) + value = [realValue stringByDecodingQuotedPrintable]; + else if ([encoding isEqualToString: @"base64"]) + value = [realValue stringByDecodingBase64]; + else + { + value = realValue; + if (![encoding isEqualToString: @"8bit"]) + [self logWithFormat: @"unknown encoding '%@'", encoding]; + } + } + else + value = realValue; + } return value; } diff --git a/SOPE/NGCards/ChangeLog b/SOPE/NGCards/ChangeLog index 679c350a..09ec6734 100644 --- a/SOPE/NGCards/ChangeLog +++ b/SOPE/NGCards/ChangeLog @@ -1,3 +1,8 @@ +2007-10-29 Wolfgang Sourdeau + + * CardElement.m ([CardElement -value:anInt]): added handling for + quoted-printable, base64 and 8bit encoding attributes. + 2007-08-07 Wolfgang Sourdeau * iCalRecurrenceRule.m ([iCalRecurrenceRule diff --git a/UI/Templates/MailerUI/UIxMailMainFrame.wox b/UI/Templates/MailerUI/UIxMailMainFrame.wox index d222204d..2356d37b 100644 --- a/UI/Templates/MailerUI/UIxMailMainFrame.wox +++ b/UI/Templates/MailerUI/UIxMailMainFrame.wox @@ -79,14 +79,6 @@ - - + + diff --git a/UI/WebServerResources/MailerUI.css b/UI/WebServerResources/MailerUI.css index fcf07c2e..a5cd1c5a 100644 --- a/UI/WebServerResources/MailerUI.css +++ b/UI/WebServerResources/MailerUI.css @@ -400,6 +400,9 @@ TD.mailer_fieldvalue a vertical-align: top; } +TR.deleted TD +{ text-decoration: line-through; } + img.mailer_imagecontent { border: 0px; diff --git a/UI/WebServerResources/MailerUI.js b/UI/WebServerResources/MailerUI.js index ddc8f027..f9a708dd 100644 --- a/UI/WebServerResources/MailerUI.js +++ b/UI/WebServerResources/MailerUI.js @@ -144,17 +144,14 @@ function openMessageWindowsForSelection(action, firstOnly) { var messageList = $("messageList"); var rows = messageList.getSelectedRowsId(); if (rows.length > 0) { - if (firstOnly) - openMessageWindow(rows[0].substr(4), + for (var i = 0; i < rows.length; i++) { + openMessageWindow(rows[i].substr(4), ApplicationBaseURL + currentMailbox - + "/" + rows[0].substr(4) + + "/" + rows[i].substr(4) + "/" + action); - else - for (var i = 0; i < rows.length; i++) - openMessageWindow(rows[i].substr(4), - ApplicationBaseURL + currentMailbox - + "/" + rows[i].substr(4) - + "/" + action); + if (firstOnly) + break; + } } else { window.alert(labels["Please select a message."]); } @@ -240,6 +237,7 @@ function deleteSelectedMessagesCallback(http) { var row = $("row_" + data["id"]); row.parentNode.removeChild(row); +// row.addClassName("deleted"); // when we'll offer "mark as deleted" deleteMessageRequestCount--; } @@ -417,6 +415,7 @@ function openMailbox(mailbox, reload, idx) { + "&asc=" + sorting["ascending"]); if (idx) url += "&idx=" + idx; + if (document.messageListAjaxRequest) { document.messageListAjaxRequest.aborted = true; document.messageListAjaxRequest.abort(); @@ -704,8 +703,9 @@ function configureLinksInMessage() { var messageDiv = $('messageContent'); var mailContentDiv = document.getElementsByClassName('mailer_mailcontent', messageDiv)[0]; - Event.observe(mailContentDiv, "contextmenu", - onMessageContentMenu.bindAsEventListener(mailContentDiv)); + if (!document.body.hasClassName("popup")) + Event.observe(mailContentDiv, "contextmenu", + onMessageContentMenu.bindAsEventListener(mailContentDiv)); var anchors = messageDiv.getElementsByTagName('a'); for (var i = 0; i < anchors.length; i++) if (anchors[i].href.substring(0,7) == "mailto:") { @@ -823,9 +823,6 @@ function moveTo(uri) { alert("MoveTo: " + uri); } -function deleteSelectedMails() { -} - /* message menu entries */ function onMenuOpenMessage(event) { return openMessageWindowsForSelection('popupview'); @@ -1332,7 +1329,7 @@ function buildMailboxes(accountName, encoded) { return account; } -function onMenuCreateFolder(event) { log ("onMenuCreateFolder " + document.menuTarget); +function onMenuCreateFolder(event) { var name = window.prompt(labels["Name :"], ""); if (name && name.length > 0) { var folderID = document.menuTarget.getAttribute("dataname"); @@ -1505,16 +1502,15 @@ function messageFlagCallback(http) { function onLabelMenuPrepareVisibility() { var messageList = $("messageList"); - var rows = messageList.getSelectedRows(); - var flags = {}; - for (var i = 1; i < 6; i++) - flags["label" + i] = true; - for (var i = 0; i < rows.length; i++) { - var rowFlags = rows[i].getAttribute("labels").split(" "); - for (var flag in flags) - if (flags[flag] && rowFlags.indexOf(flag) == -1) - flags[flag] = false; + + if (messageList) { + var rows = messageList.getSelectedRows(); + for (var i = 0; i < rows.length; i++) { + $w(rows[i].getAttribute("labels")).each(function(flag) { + flags[flag] = true; + }); + } } var lis = this.childNodesWithTag("ul")[0].childNodesWithTag("li") diff --git a/UI/WebServerResources/UIxMailPopupView.js b/UI/WebServerResources/UIxMailPopupView.js index bfbed7db..b9cb5946 100644 --- a/UI/WebServerResources/UIxMailPopupView.js +++ b/UI/WebServerResources/UIxMailPopupView.js @@ -4,4 +4,9 @@ function onPrintCurrentMessage(event) { preventDefault(event); } -addEvent(window, 'load', resizeMailContent); +function initPopupMailer(event) { + configureLinksInMessage(); + resizeMailContent(); +} + +addEvent(window, 'load', initPopupMailer);