From f0feb7ea77c26dbfbf4e12f565314cd3fa9cf7e9 Mon Sep 17 00:00:00 2001 From: helge Date: Sat, 30 Jul 2005 12:54:34 +0000 Subject: [PATCH] added default to disable etag caching in mail objects fixed the title of image attachments removed use of tb.view method names (use view instead) git-svn-id: http://svn.opengroupware.org/SOGo/trunk@920 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SoObjects/Mailer/ChangeLog | 5 ++++ SoObjects/Mailer/README | 2 ++ SoObjects/Mailer/SOGoMailBodyPart.m | 14 +++++++--- SoObjects/Mailer/SOGoMailObject.m | 12 +++++--- SoObjects/Mailer/Version | 2 +- UI/MailerUI/ChangeLog | 6 ++++ UI/MailerUI/Version | 2 +- UI/MailerUI/product.plist | 28 ------------------- UI/Templates/ChangeLog | 8 ++++++ .../UIxMailPartImageViewer.wox | 2 +- UI/Templates/MailerUI/UIxMailMainFrame.wox | 2 +- UI/WebServerResources/ChangeLog | 4 +++ UI/WebServerResources/mailer.js | 2 +- 13 files changed, 48 insertions(+), 41 deletions(-) diff --git a/SoObjects/Mailer/ChangeLog b/SoObjects/Mailer/ChangeLog index 230be68e..c8651eac 100644 --- a/SoObjects/Mailer/ChangeLog +++ b/SoObjects/Mailer/ChangeLog @@ -1,3 +1,8 @@ +2005-07-30 Helge Hess + + * SOGoMailBodyPart.m, SOGoMailObject.m: added default to disable etag + delivery/checks for mail objects (SOGoMailDisableETag) (v0.9.124) + 2005-07-22 Helge Hess * v0.9.123 diff --git a/SoObjects/Mailer/README b/SoObjects/Mailer/README index 8d0e5cc9..86087a35 100644 --- a/SoObjects/Mailer/README +++ b/SoObjects/Mailer/README @@ -56,3 +56,5 @@ SOGoDoNotFetchMailHeader YES|NO - whether or not to fetch the mail header - the header gives much more information about the mail - eg: spam status - parsing the mail header takes time + +SOGoMailDisableETag YES|NO - whether or not to check/deliver an etag diff --git a/SoObjects/Mailer/SOGoMailBodyPart.m b/SoObjects/Mailer/SOGoMailBodyPart.m index 3ee0a3db..ddad7dff 100644 --- a/SoObjects/Mailer/SOGoMailBodyPart.m +++ b/SoObjects/Mailer/SOGoMailBodyPart.m @@ -34,16 +34,22 @@ static BOOL debugOn = NO; } + (void)initialize { + NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; + NSAssert2([super version] == 1, @"invalid superclass (%@) version %i !", NSStringFromClass([self superclass]), [super version]); - mailETag = [[NSString alloc] initWithFormat:@"\"imap4url_%d_%d_%03d\"", + if (![[ud objectForKey:@"SOGoMailDisableETag"] boolValue]) { + mailETag = [[NSString alloc] initWithFormat:@"\"imap4url_%d_%d_%03d\"", UIX_MAILER_MAJOR_VERSION, UIX_MAILER_MINOR_VERSION, UIX_MAILER_SUBMINOR_VERSION]; - NSLog(@"Note(SOGoMailBodyPart): using constant etag for mail parts: '%@'", - mailETag); + NSLog(@"Note(SOGoMailBodyPart): using constant etag for mail parts: '%@'", + mailETag); + } + else + NSLog(@"Note(SOGoMailBodyPart): etag caching disabled!"); } - (void)dealloc { @@ -271,7 +277,7 @@ static BOOL debugOn = NO; [self partInfo]]; // TODO: wrong, could be encoded - r = [_ctx response]; + r = [(WOContext *)_ctx response]; [r setHeader:[self davContentType] forKey:@"content-type"]; [r setHeader:[NSString stringWithFormat:@"%d", [data length]] forKey:@"content-length"]; diff --git a/SoObjects/Mailer/SOGoMailObject.m b/SoObjects/Mailer/SOGoMailObject.m index 1bbba74c..3e60fc73 100644 --- a/SoObjects/Mailer/SOGoMailObject.m +++ b/SoObjects/Mailer/SOGoMailObject.m @@ -73,12 +73,16 @@ static BOOL debugSoParts = NO; nil]; } - mailETag = [[NSString alloc] initWithFormat:@"\"imap4url_%d_%d_%03d\"", + if (![[ud objectForKey:@"SOGoMailDisableETag"] boolValue]) { + mailETag = [[NSString alloc] initWithFormat:@"\"imap4url_%d_%d_%03d\"", UIX_MAILER_MAJOR_VERSION, UIX_MAILER_MINOR_VERSION, UIX_MAILER_SUBMINOR_VERSION]; - NSLog(@"Note(SOGoMailObject): using constant etag for mail parts: '%@'", - mailETag); + NSLog(@"Note(SOGoMailObject): using constant etag for mail parts: '%@'", + mailETag); + } + else + NSLog(@"Note(SOGoMailObject): etag caching disabled!"); } - (void)dealloc { @@ -720,7 +724,7 @@ static BOOL debugSoParts = NO; reason:@"did not find IMAP4 message"]; } - r = [_ctx response]; + r = [(WOContext *)_ctx response]; [r setHeader:@"message/rfc822" forKey:@"content-type"]; [r setContent:content]; return r; diff --git a/SoObjects/Mailer/Version b/SoObjects/Mailer/Version index ad018463..31b0a460 100644 --- a/SoObjects/Mailer/Version +++ b/SoObjects/Mailer/Version @@ -1,6 +1,6 @@ # Version file -SUBMINOR_VERSION:=123 +SUBMINOR_VERSION:=124 # v0.9.114 requires libNGMime v4.5.229 # v0.9.114 requires libNGExtensions v4.5.165 diff --git a/UI/MailerUI/ChangeLog b/UI/MailerUI/ChangeLog index c5ec6ef3..56117495 100644 --- a/UI/MailerUI/ChangeLog +++ b/UI/MailerUI/ChangeLog @@ -1,3 +1,9 @@ +2005-07-30 Helge Hess + + * v0.9.173 + + * product.plist: removed tb.view methods (just use 'view' instead) + 2005-07-26 Helge Hess * UIxMailTree.m: improved block debugging (v0.9.172) diff --git a/UI/MailerUI/Version b/UI/MailerUI/Version index 08fd93f9..89e77eff 100644 --- a/UI/MailerUI/Version +++ b/UI/MailerUI/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=172 +SUBMINOR_VERSION:=173 # v0.9.140 requires SoObjects/Mailer v0.9.100 # v0.9.134 requires libSOGo v0.9.41 diff --git a/UI/MailerUI/product.plist b/UI/MailerUI/product.plist index ac33909d..35f10cb2 100644 --- a/UI/MailerUI/product.plist +++ b/UI/MailerUI/product.plist @@ -89,10 +89,6 @@ protectedBy = "View"; pageName = "UIxMailListView"; }; - "tb.view" = { /* primary entry for mailer actions */ - protectedBy = "View"; - pageName = "UIxMailListView"; - }; index = { protectedBy = "View"; pageName = "UIxMailListView"; @@ -176,10 +172,6 @@ protectedBy = "View"; pageName = "UIxMailView"; }; - "tb.view" = { /* primary entry for mailer actions */ - protectedBy = "View"; - pageName = "UIxMailView"; - }; getMail = { protectedBy = "View"; @@ -246,10 +238,6 @@ protectedBy = "View"; pageName = "UIxMailAccountsView"; }; - "tb.view" = { /* primary entry for mailer actions */ - protectedBy = "View"; - pageName = "UIxMailAccountsView"; - }; getMail = { protectedBy = "View"; pageName = "UIxMailAccountsView"; @@ -269,10 +257,6 @@ protectedBy = "View"; pageName = "UIxMailAccountView"; }; - "tb.view" = { /* primary entry for mailer actions */ - protectedBy = "View"; - pageName = "UIxMailAccountView"; - }; getMail = { protectedBy = "View"; pageName = "UIxMailAccountView"; @@ -321,10 +305,6 @@ protectedBy = "View"; pageName = "UIxMailListView"; }; - "tb.view" = { /* primary entry for mailer actions */ - protectedBy = "View"; - pageName = "UIxMailListView"; - }; getMail = { protectedBy = "View"; pageName = "UIxMailListView"; @@ -349,10 +329,6 @@ protectedBy = "View"; pageName = "UIxMailEditor"; }; - "tb.view" = { /* primary entry for mailer actions */ - protectedBy = "View"; - pageName = "UIxMailEditor"; - }; edit = { protectedBy = "View"; pageName = "UIxMailEditor"; @@ -432,10 +408,6 @@ protectedBy = "View"; pageName = "UIxFilterList"; }; - "tb.view" = { /* primary entry for mailer actions */ - protectedBy = "View"; - pageName = "UIxFilterList"; - }; create = { protectedBy = "View"; pageName = "UIxFilterList"; diff --git a/UI/Templates/ChangeLog b/UI/Templates/ChangeLog index 51f7fad8..4f2fce6a 100644 --- a/UI/Templates/ChangeLog +++ b/UI/Templates/ChangeLog @@ -1,3 +1,11 @@ +2005-07-30 Helge Hess + + * MailPartViewers/UIxMailPartImageViewer.wox: fixed 'title' attribute + of image tag (now displays filename) + + * MailerUI/UIxMailMainFrame.wox: use 'view' instead of 'tb.view' to + activate links + 2005-07-26 Helge Hess * ContactsUI/UIxContactEditor.wox: removed copy-from-anais button diff --git a/UI/Templates/MailPartViewers/UIxMailPartImageViewer.wox b/UI/Templates/MailPartViewers/UIxMailPartImageViewer.wox index fb176335..1590d7a0 100644 --- a/UI/Templates/MailPartViewers/UIxMailPartImageViewer.wox +++ b/UI/Templates/MailPartViewers/UIxMailPartImageViewer.wox @@ -4,6 +4,6 @@ xmlns:var="http://www.skyrix.com/od/binding" var:src="pathToImage" - var:title="bodyInfo" + var:title="filenameForDisplay" class="mailer_imagecontent" > diff --git a/UI/Templates/MailerUI/UIxMailMainFrame.wox b/UI/Templates/MailerUI/UIxMailMainFrame.wox index fe8398f0..4c0f6c32 100644 --- a/UI/Templates/MailerUI/UIxMailMainFrame.wox +++ b/UI/Templates/MailerUI/UIxMailMainFrame.wox @@ -134,7 +134,7 @@
diff --git a/UI/WebServerResources/ChangeLog b/UI/WebServerResources/ChangeLog index 2c08f0a1..aa3e1f83 100644 --- a/UI/WebServerResources/ChangeLog +++ b/UI/WebServerResources/ChangeLog @@ -1,3 +1,7 @@ +2005-07-30 Helge Hess + + * mailer.js: use standard 'view' instead of 'tb.view' method + 2005-07-22 Helge Hess * mailer-toolbar.css: fixed send and attach buttons to use 24x24 images diff --git a/UI/WebServerResources/mailer.js b/UI/WebServerResources/mailer.js index 1aa75b1b..2af615a8 100644 --- a/UI/WebServerResources/mailer.js +++ b/UI/WebServerResources/mailer.js @@ -43,7 +43,7 @@ function openMessageWindow(sender, msguid, url) { function clickedUid(sender, msguid) { resetSelection(window); - openMessageWindow(sender, msguid, msguid + "/tb.view"); + openMessageWindow(sender, msguid, msguid + "/view"); return true; } function doubleClickedUid(sender, msguid) { -- 2.39.5