diff --git a/ChangeLog b/ChangeLog index f77b4a32c..a8e575350 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,27 @@ +2007-11-15 Ludovic Marcotte + + * UI/WebServerResources/MailerUI.js + We now check for empty selection and warn the + user about it when deleting messages + + * SoObjects/Mailer/SOGoDraftObject.m + Correctly check for the presence of a subject + before attempting to forward a message from + the Drafts folder. + + * SoObjects/Mailer/SOGoMailObject+Draft.m + We no longer use "[Fwd: ]" but simply "Fwd:" + when forwarding email messages. + + * SoObjects/SOGo/SOGoUser.m + Modified the default forwarding format to be + inline instead of "attachment". + + * SoObjects/Mailer/SOGoDraftObject.m + We now create and use a NGMimeContentDispositionHeaderField + in order to avoid encoding the whole Content-Disposition + header in case a non-ASCII char is present! + 2007-11-13 Wolfgang Sourdeau * SoObjects/SOGo/iCalEntityObject+Utilities.m ([iCalEntityObject diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m index e4293472e..f56c1be80 100644 --- a/SoObjects/Mailer/SOGoDraftObject.m +++ b/SoObjects/Mailer/SOGoDraftObject.m @@ -51,6 +51,7 @@ #import #import #import +#import #import #import @@ -614,10 +615,14 @@ static BOOL showTextAttachmentsInline = NO; SOGoUser *currentUser; [sourceMail fetchCoreInfos]; - - info = [NSDictionary dictionaryWithObject: [sourceMail subjectForForward] - forKey: @"subject"]; - [self setHeaders: info]; + + if ([sourceMail subjectForForward]) + { + info = [NSDictionary dictionaryWithObject: [sourceMail subjectForForward] + forKey: @"subject"]; + [self setHeaders: info]; + } + [self setSourceURL: [sourceMail imap4URLString]]; [self setSourceFlag: @"$Forwarded"]; @@ -905,7 +910,7 @@ static BOOL showTextAttachmentsInline = NO; cdtype = @"inline"; else cdtype = @"attachment"; - + cd = [cdtype stringByAppendingString: @"; filename=\""]; cd = [cd stringByAppendingString: _name]; cd = [cd stringByAppendingString: @"\""]; @@ -950,7 +955,13 @@ static BOOL showTextAttachmentsInline = NO; is7bit = YES; } if ((s = [self contentDispositionForAttachmentWithName:_name])) - [map setObject:s forKey: @"content-disposition"]; + { + NGMimeContentDispositionHeaderField *o; + + o = [[NGMimeContentDispositionHeaderField alloc] initWithString: s]; + [map setObject:o forKey: @"content-disposition"]; + [o release]; + } /* prepare body content */ diff --git a/SoObjects/Mailer/SOGoMailObject+Draft.m b/SoObjects/Mailer/SOGoMailObject+Draft.m index 91f3a17a9..c267eec30 100644 --- a/SoObjects/Mailer/SOGoMailObject+Draft.m +++ b/SoObjects/Mailer/SOGoMailObject+Draft.m @@ -180,7 +180,7 @@ subject = [self decodedSubject]; if ([subject length] > 0) - newSubject = [NSString stringWithFormat: @"[Fwd: %@]", subject]; + newSubject = [NSString stringWithFormat: @"Fwd: %@", subject]; else newSubject = subject; diff --git a/SoObjects/SOGo/SOGoUser.m b/SoObjects/SOGo/SOGoUser.m index 9488c1dd3..a8ebbc40f 100644 --- a/SoObjects/SOGo/SOGoUser.m +++ b/SoObjects/SOGo/SOGoUser.m @@ -506,7 +506,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek"; messageForwarding = [[self userDefaults] stringForKey: @"MessageForwarding"]; if (![messageForwarding length]) - messageForwarding = @"attached"; + messageForwarding = @"inline"; return messageForwarding; } diff --git a/UI/WebServerResources/MailerUI.js b/UI/WebServerResources/MailerUI.js index ea83dc471..95f01d730 100644 --- a/UI/WebServerResources/MailerUI.js +++ b/UI/WebServerResources/MailerUI.js @@ -211,14 +211,18 @@ function deleteSelectedMessages(sender) { var messageList = $("messageList"); var rowIds = messageList.getSelectedRowsId(); - for (var i = 0; i < rowIds.length; i++) { - var url; - var rowId = rowIds[i].substr(4); - var messageId = currentMailbox + "/" + rowId; - url = ApplicationBaseURL + messageId + "/trash"; - deleteMessageRequestCount++; - var data = { "id": rowId, "mailbox": currentMailbox, "messageId": messageId }; - triggerAjaxRequest(url, deleteSelectedMessagesCallback, data); + if (rowIds.length > 0) { + for (var i = 0; i < rowIds.length; i++) { + var url; + var rowId = rowIds[i].substr(4); + var messageId = currentMailbox + "/" + rowId; + url = ApplicationBaseURL + messageId + "/trash"; + deleteMessageRequestCount++; + var data = { "id": rowId, "mailbox": currentMailbox, "messageId": messageId }; + triggerAjaxRequest(url, deleteSelectedMessagesCallback, data); + } + } else { + window.alert(labels["Please select a message."]); } return false;