From 44cbfad7b58b196839b32d3f477d68d72e48dda1 Mon Sep 17 00:00:00 2001 From: znek Date: Tue, 12 Oct 2004 11:38:10 +0000 Subject: [PATCH] work in progress git-svn-id: http://svn.opengroupware.org/SOGo/trunk@383 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/SOGo.xcode/project.pbxproj | 333 +++++++++++++++++++ SOGo/UI/Mailer/ChangeLog | 12 + SOGo/UI/Mailer/English.lproj/default.strings | 7 + SOGo/UI/Mailer/GNUmakefile | 12 +- SOGo/UI/Mailer/README | 1 + SOGo/UI/Mailer/UIxMailEditor.wox | 5 +- SOGo/UI/Mailer/UIxMailToSelection.m | 162 ++++++--- SOGo/UI/Mailer/UIxMailToSelection.wox | 51 +-- SOGo/UI/Mailer/Version | 2 +- 9 files changed, 521 insertions(+), 64 deletions(-) diff --git a/SOGo/SOGo.xcode/project.pbxproj b/SOGo/SOGo.xcode/project.pbxproj index 32da5bb2..139a98ca 100644 --- a/SOGo/SOGo.xcode/project.pbxproj +++ b/SOGo/SOGo.xcode/project.pbxproj @@ -616,6 +616,309 @@ tabWidth = 8; usesTabs = 1; }; + AD2C74A1071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = text; + path = mailer.css; + refType = 4; + sourceTree = ""; + }; + AD2C74A2071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.javascript; + path = mailer.js; + refType = 4; + sourceTree = ""; + }; + AD2C74A3071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = text; + path = README; + refType = 4; + sourceTree = ""; + }; + AD2C74A5071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxEnvelopeAddressFormatter.m; + refType = 4; + sourceTree = ""; + }; + AD2C74A6071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxMailAccountsView.m; + refType = 4; + sourceTree = ""; + }; + AD2C74A7071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = text.xml; + path = UIxMailAccountsView.wox; + refType = 4; + sourceTree = ""; + }; + AD2C74A8071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxMailAccountView.m; + refType = 4; + sourceTree = ""; + }; + AD2C74A9071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = text.xml; + path = UIxMailAccountView.wox; + refType = 4; + sourceTree = ""; + }; + AD2C74AA071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = UIxMailFormatter.h; + refType = 4; + sourceTree = ""; + }; + AD2C74AB071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxMailFormatter.m; + refType = 4; + sourceTree = ""; + }; + AD2C74AC071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxMailMainFrame.m; + refType = 4; + sourceTree = ""; + }; + AD2C74AD071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = text.xml; + path = UIxMailMainFrame.wox; + refType = 4; + sourceTree = ""; + }; + AD2C74AE071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxMailPartAlternativeViewer.m; + refType = 4; + sourceTree = ""; + }; + AD2C74AF071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = text.xml; + path = UIxMailPartAlternativeViewer.wox; + refType = 4; + sourceTree = ""; + }; + AD2C74B0071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxMailPartImageViewer.m; + refType = 4; + sourceTree = ""; + }; + AD2C74B1071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = text.xml; + path = UIxMailPartImageViewer.wox; + refType = 4; + sourceTree = ""; + }; + AD2C74B2071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxMailPartMixedViewer.m; + refType = 4; + sourceTree = ""; + }; + AD2C74B3071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = text.xml; + path = UIxMailPartMixedViewer.wox; + refType = 4; + sourceTree = ""; + }; + AD2C74B4071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxMailPartTextViewer.m; + refType = 4; + sourceTree = ""; + }; + AD2C74B5071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = text.xml; + path = UIxMailPartTextViewer.wox; + refType = 4; + sourceTree = ""; + }; + AD2C74B6071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = UIxMailPartViewer.h; + refType = 4; + sourceTree = ""; + }; + AD2C74B7071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxMailPartViewer.m; + refType = 4; + sourceTree = ""; + }; + AD2C74B8071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = UIxMailRenderingContext.h; + refType = 4; + sourceTree = ""; + }; + AD2C74B9071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxMailRenderingContext.m; + refType = 4; + sourceTree = ""; + }; + AD2C74BA071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxMailToolbar.m; + refType = 4; + sourceTree = ""; + }; + AD2C74BB071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = text.xml; + path = UIxMailToolbar.wox; + refType = 4; + sourceTree = ""; + }; + AD2C74BC071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxMailTree.m; + refType = 4; + sourceTree = ""; + }; + AD2C74BD071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = text.xml; + path = UIxMailTree.wox; + refType = 4; + sourceTree = ""; + }; + AD2C74BE071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxSubjectFormatter.m; + refType = 4; + sourceTree = ""; + }; + AD2C74BF071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = "WOContext+UIxMailer.h"; + refType = 4; + sourceTree = ""; + }; + AD2C74C0071A9FF70087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = "WOContext+UIxMailer.m"; + refType = 4; + sourceTree = ""; + }; + AD2C74C3071AA0190087E027 = { + children = ( + AD2C7510071AAAC80087E027, + AD2C74A1071A9FF70087E027, + AD2C74A2071A9FF70087E027, + ); + isa = PBXGroup; + name = "CSS / Scripts"; + refType = 4; + sourceTree = ""; + }; + AD2C74C6071AA0ED0087E027 = { + children = ( + AD2C74AA071A9FF70087E027, + AD2C74AB071A9FF70087E027, + AD2C74BE071A9FF70087E027, + AD2C74A5071A9FF70087E027, + ); + isa = PBXGroup; + name = Formatters; + refType = 4; + sourceTree = ""; + }; + AD2C7510071AAAC80087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = text; + path = uix.css; + refType = 4; + sourceTree = ""; + }; + AD2C76D5071BF4EB0087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxMailEditorAction.m; + refType = 4; + sourceTree = ""; + }; + AD2C76D6071BF4EB0087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxMailToSelection.m; + refType = 4; + sourceTree = ""; + }; + AD2C76D7071BF4EB0087E027 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = text.xml; + path = UIxMailToSelection.wox; + refType = 4; + sourceTree = ""; + }; AD494C6106F5EA6600E51EC9 = { fileEncoding = 4; isa = PBXFileReference; @@ -1771,6 +2074,7 @@ }; ADDF4DBB06DE0E9900C4E7F8 = { children = ( + AD2C74A3071A9FF70087E027, ADDF4DC806DE0E9A00C4E7F8, ADDF4DBF06DE0E9900C4E7F8, ADDF4DC006DE0E9900C4E7F8, @@ -1780,6 +2084,7 @@ ADDF4DC906DE0E9A00C4E7F8, ADDF4DC106DE0E9A00C4E7F8, ADDF4DD306DE0EB600C4E7F8, + AD2C74C3071AA0190087E027, ADDF4DD906DE0ECB00C4E7F8, ADDF4DD606DE0EC100C4E7F8, ); @@ -1989,8 +2294,28 @@ }; ADDF4DD606DE0EC100C4E7F8 = { children = ( + AD2C74A6071A9FF70087E027, + AD2C74A7071A9FF70087E027, + AD2C74A8071A9FF70087E027, + AD2C74A9071A9FF70087E027, + AD2C74AC071A9FF70087E027, + AD2C74AD071A9FF70087E027, + AD2C74AE071A9FF70087E027, + AD2C74AF071A9FF70087E027, + AD2C74B0071A9FF70087E027, + AD2C74B1071A9FF70087E027, + AD2C74B2071A9FF70087E027, + AD2C74B3071A9FF70087E027, + AD2C74B4071A9FF70087E027, + AD2C74B5071A9FF70087E027, + AD2C74BA071A9FF70087E027, + AD2C74BB071A9FF70087E027, + AD2C74BC071A9FF70087E027, + AD2C74BD071A9FF70087E027, ADDF4DCA06DE0E9A00C4E7F8, ADDF4DCB06DE0E9A00C4E7F8, + AD2C76D6071BF4EB0087E027, + AD2C76D7071BF4EB0087E027, ADDF4DCC06DE0E9A00C4E7F8, ADDF4DCD06DE0E9A00C4E7F8, ADDF4DCE06DE0E9A00C4E7F8, @@ -2005,6 +2330,14 @@ children = ( ADDF4DBE06DE0E9900C4E7F8, ADDF4DC706DE0E9A00C4E7F8, + AD2C74C6071AA0ED0087E027, + AD2C76D5071BF4EB0087E027, + AD2C74B6071A9FF70087E027, + AD2C74B7071A9FF70087E027, + AD2C74B8071A9FF70087E027, + AD2C74B9071A9FF70087E027, + AD2C74BF071A9FF70087E027, + AD2C74C0071A9FF70087E027, ); isa = PBXGroup; name = Classes; diff --git a/SOGo/UI/Mailer/ChangeLog b/SOGo/UI/Mailer/ChangeLog index d2b497f8..2490be34 100644 --- a/SOGo/UI/Mailer/ChangeLog +++ b/SOGo/UI/Mailer/ChangeLog @@ -1,3 +1,15 @@ +2004-10-12 Marcus Mueller + + * v0.9.32 + + * UIxMailEditor.wox: changed API for UIxMailToSelection + + * UIxMailToSelection.[wox|m]: new component template + + * English.lproj/default.strings: new localizable strings + + * README: updated + 2004-10-12 Helge Hess * v0.9.31 diff --git a/SOGo/UI/Mailer/English.lproj/default.strings b/SOGo/UI/Mailer/English.lproj/default.strings index 6cf7ce7d..7e03676e 100644 --- a/SOGo/UI/Mailer/English.lproj/default.strings +++ b/SOGo/UI/Mailer/English.lproj/default.strings @@ -1 +1,8 @@ /* this file is in ISO-8859-1 format! */ + +"From" = "From"; +"Subject" = "Subject"; + +"TO" = "To"; +"CC" = "Cc"; +"BCC" = "Bcc"; diff --git a/SOGo/UI/Mailer/GNUmakefile b/SOGo/UI/Mailer/GNUmakefile index 4378a58f..bc230ba3 100644 --- a/SOGo/UI/Mailer/GNUmakefile +++ b/SOGo/UI/Mailer/GNUmakefile @@ -17,9 +17,9 @@ MailerUI_OBJC_FILES += \ WOContext+UIxMailer.m \ UIxMailRenderingContext.m \ \ - UIxMailMainFrame.m \ - UIxMailTree.m \ - UIxMailToolbar.m \ + UIxMailMainFrame.m \ + UIxMailTree.m \ + UIxMailToolbar.m \ \ UIxMailAccountsView.m \ UIxMailAccountView.m \ @@ -41,9 +41,9 @@ MailerUI_RESOURCE_FILES += \ product.plist \ MailerUI_RESOURCE_FILES += \ - UIxMailMainFrame.wox \ - UIxMailTree.wox \ - UIxMailToolbar.wox \ + UIxMailMainFrame.wox \ + UIxMailTree.wox \ + UIxMailToolbar.wox \ \ UIxMailAccountsView.wox \ UIxMailAccountView.wox \ diff --git a/SOGo/UI/Mailer/README b/SOGo/UI/Mailer/README index 9cbcaeb1..f4d6165f 100644 --- a/SOGo/UI/Mailer/README +++ b/SOGo/UI/Mailer/README @@ -13,6 +13,7 @@ Components UIxMailAccountView.wox UIxMailAccountsView.wox UIxMailEditor.wox +UIxMailToSelection.wox UIxMailListView.wox UIxMailMainFrame.wox UIxMailTree.wox diff --git a/SOGo/UI/Mailer/UIxMailEditor.wox b/SOGo/UI/Mailer/UIxMailEditor.wox index 7c6f291f..2bdf5bca 100644 --- a/SOGo/UI/Mailer/UIxMailEditor.wox +++ b/SOGo/UI/Mailer/UIxMailEditor.wox @@ -24,7 +24,10 @@
+ to="to" + cc="cc" + bcc="bcc" + />
diff --git a/SOGo/UI/Mailer/UIxMailToSelection.m b/SOGo/UI/Mailer/UIxMailToSelection.m index feecc73b..275df8ce 100644 --- a/SOGo/UI/Mailer/UIxMailToSelection.m +++ b/SOGo/UI/Mailer/UIxMailToSelection.m @@ -1,63 +1,151 @@ /* - Copyright (C) 2004 SKYRIX Software AG - - This file is part of OpenGroupware.org. + Copyright (C) 2004 SKYRIX Software AG + + This file is part of OpenGroupware.org. + + OGo is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + OGo is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with OGo; see the file COPYING. If not, write to the + Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. + */ +// $Id$ - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - OGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. +#include - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ -// $Id$ +/* + UIxMailToSelection + + Select a set of address headers for composing an email. + + Bindings: + to - array of strings suitable for placement in a To: header + cc - array of strings suitable for placement in a Cc: header + bcc - array of strings suitable for placement in a Bcc: header + + Sample: + + */ -#include +@class NSArray; @interface UIxMailToSelection : UIxComponent { - unsigned currentFieldRowIndex; + NSArray *to; + NSArray *cc; + NSArray *bcc; } +- (void)setTo:(NSArray *)_to; +- (NSArray *)to; +- (void)setCc:(NSArray *)_cc; +- (NSArray *)cc; +- (void)setBcc:(NSArray *)_bcc; +- (NSArray *)bcc; + +- (NSArray *)getAddressesOfType:(NSString *)_type + fromFormValues:(NSArray *)_values; + @end #include "common.h" @implementation UIxMailToSelection +- (void)dealloc { + [self->to release]; + [self->cc release]; + [self->bcc release]; + [super dealloc]; +} + +/* notifications */ + +- (void)sleep { + [super sleep]; +} + /* accessors */ -- (void)setCurrentFieldRowIndex:(unsigned)_idx { - self->currentFieldRowIndex = _idx; +- (void)setTo:(NSArray *)_to { + ASSIGN(self->to, _to); +} +- (NSArray *)to { + return self->to; +} + +- (void)setCc:(NSArray *)_cc { + ASSIGN(self->cc, _cc); +} +- (NSArray *)cc { + return self->cc; +} + +- (void)setBcc:(NSArray *)_bcc { + ASSIGN(self->bcc, _bcc); } -- (unsigned)currentFieldRowIndex { - return self->currentFieldRowIndex; +- (NSArray *)bcc { + return self->bcc; } -- (NSString *)typeFormName { - unsigned char buf[16]; - sprintf(buf, "type_%d", [self currentFieldRowIndex]); - return [NSString stringWithCString:buf]; +/* handling requests */ + +- (NSArray *)getAddressesOfType:(NSString *)_type + fromFormValues:(NSArray *)_values +{ + unsigned i, count; + NSMutableArray *result; + + count = [_values count]; + result = [NSMutableArray arrayWithCapacity:count]; + for (i = 0; i < count; i++) { + NSString *s; + + s = [_values objectAtIndex:i]; + if ([s length] == 0) + continue; + } + return result; } -- (NSString *)mailFormName { - unsigned char buf[16]; - sprintf(buf, "email_%d", [self currentFieldRowIndex]); - return [NSString stringWithCString:buf]; + +- (void)takeValuesFromRequest:(WORequest *)_rq inContext:(WOContext *)_ctx { + /* OK, we have a special form value processor */ + NSArray *tmp; + + [self debugWithFormat:@"Note: will take values ..."]; + + tmp = [self getAddressesOfType:@"to" + fromFormValues:[_rq formValuesForKey:@"to"]]; + [self setTo:tmp]; + tmp = [self getAddressesOfType:@"cc" + fromFormValues:[_rq formValuesForKey:@"cc"]]; + [self setCc:tmp]; + tmp = [self getAddressesOfType:@"bcc" + fromFormValues:[_rq formValuesForKey:@"bcc"]]; + [self setBcc:tmp]; } -- (NSArray *)dummyList { - static NSArray *d = nil; - if (d == nil) - d = [[NSArray alloc] initWithObjects:@"0", @"1", @"2", nil]; - return d; +/* response generation */ + +- (NSString *)jsCode { + static NSString *script = \ + @"function addAddress(type, cn, dn, email, uid, sn) {\n" + @"}\n"; + return script; } -@end /* UIxMailToSelection */ +@end diff --git a/SOGo/UI/Mailer/UIxMailToSelection.wox b/SOGo/UI/Mailer/UIxMailToSelection.wox index 51fd233b..b67abbd8 100644 --- a/SOGo/UI/Mailer/UIxMailToSelection.wox +++ b/SOGo/UI/Mailer/UIxMailToSelection.wox @@ -1,25 +1,38 @@ - - + - + +
+ + - - - -
- + + - + +
+ + + + + + + + + + \ No newline at end of file diff --git a/SOGo/UI/Mailer/Version b/SOGo/UI/Mailer/Version index 7fd6910f..97a71362 100644 --- a/SOGo/UI/Mailer/Version +++ b/SOGo/UI/Mailer/Version @@ -1,3 +1,3 @@ # $Id$ -SUBMINOR_VERSION:=31 +SUBMINOR_VERSION:=32 -- 2.39.5