From: znek Date: Wed, 11 Aug 2004 17:46:10 +0000 (+0000) Subject: AnaisUidSelector, usage of it in UIxCalWeekOverview and diverse enhancements X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d75063dcc869a4397e9bacb4d61e5a94a7daa2a;p=scalable-opengroupware.org AnaisUidSelector, usage of it in UIxCalWeekOverview and diverse enhancements git-svn-id: http://svn.opengroupware.org/SOGo/trunk@184 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/SOGo.xcode/project.pbxproj b/SOGo/SOGo.xcode/project.pbxproj index 5116ad7c..4a20be5d 100644 --- a/SOGo/SOGo.xcode/project.pbxproj +++ b/SOGo/SOGo.xcode/project.pbxproj @@ -36,9 +36,9 @@ AD07123606C904C900A9EEF4 = { children = ( AD07137606C926BF00A9EEF4, + AD07123D06C904C900A9EEF4, AD07123706C904C900A9EEF4, AD07123C06C904C900A9EEF4, - AD07123D06C904C900A9EEF4, AD07124306C904E500A9EEF4, AD07124006C904DE00A9EEF4, AD07124606C9050700A9EEF4, @@ -131,6 +131,8 @@ children = ( AD07124C06C9052700A9EEF4, AD07124B06C9052700A9EEF4, + AD0715CB06CA711600A9EEF4, + AD0715CA06CA711600A9EEF4, ); isa = PBXGroup; name = Components; @@ -177,6 +179,24 @@ path = ChangeLog; refType = 4; sourceTree = ""; + tabWidth = 4; + usesTabs = 1; + }; + AD0715CA06CA711600A9EEF4 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = text.xml; + path = AnaisUidSelector.wox; + refType = 4; + sourceTree = ""; + }; + AD0715CB06CA711600A9EEF4 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = AnaisUidSelector.m; + refType = 4; + sourceTree = ""; }; AD152B6F06AC159A002375D2 = { fileEncoding = 4; diff --git a/SOGo/UI/Anais/AnaisSelector.m b/SOGo/UI/Anais/AnaisSelector.m index ecde1632..9cba783f 100644 --- a/SOGo/UI/Anais/AnaisSelector.m +++ b/SOGo/UI/Anais/AnaisSelector.m @@ -42,7 +42,7 @@ - (NSString *)jsFunctionName; - (NSString *)jsFunctionHref; -- (NSString *)getCode; +- (NSString *)jsCode; @end #include "common.h" @@ -108,7 +108,7 @@ [self jsFunctionName]]; } -- (NSString *)getCode { +- (NSString *)jsCode { static NSString *codeFmt = \ @"function %@() {\n" @" var url = '/anais/aideAnais.php?m_fonc=%@%@&m_champ=mail,uid,sn#mon_etiquette';\n" diff --git a/SOGo/UI/Anais/AnaisSelector.wox b/SOGo/UI/Anais/AnaisSelector.wox index 6e67a5e4..1f192869 100644 --- a/SOGo/UI/Anais/AnaisSelector.wox +++ b/SOGo/UI/Anais/AnaisSelector.wox @@ -4,9 +4,10 @@ xmlns:var="http://www.skyrix.com/od/binding" xmlns:const="http://www.skyrix.com/od/constant" xmlns:rsrc="OGo:url" + class="button_auto_env" > + +@interface AnaisUidSelector : UIxComponent +{ + NSArray *calendarUIDs; + NSString *uid; + BOOL meTooChecked; +} + +- (NSString *)prettyUid; + +- (NSString *)jsCode; + +@end + +#include "common.h" + +@implementation AnaisUidSelector + +- (id)init { + self = [super init]; + if(self) { + } + return self; +} + +- (void)dealloc { + [self->calendarUIDs release]; + [self->uid release]; + [super dealloc]; +} + +- (void)setCalendarUIDs:(NSArray *)_calendarUIDs { + ASSIGN(self->calendarUIDs, _calendarUIDs); +} +- (NSArray *)calendarUIDs { + return self->calendarUIDs; +} +- (void)setUid:(NSString *)_uid { + ASSIGN(self->uid, _uid); +} +- (NSString *)uid { + return self->uid; +} +- (NSString *)prettyUid { + if([self->calendarUIDs objectAtIndex:0] == self->uid) + return self->uid; + return [NSString stringWithFormat:@", %@", self->uid]; +} + +- (void)setMeTooChecked:(BOOL)_meTooChecked { + self->meTooChecked = _meTooChecked; +} +- (BOOL)meTooChecked { + return self->meTooChecked; +} + + +/* JavaScript */ + +- (NSString *)jsCode { + static NSString *script = \ + @"function submitUidList() {\n" + @"}\n" + @"function clearUidList() {\n" + @" var o = document.getElementById('anaisUidList');\n" + @" var dst = o.parentNode;\n" + @" var n = document.createElement('td');\n" + @" n.setAttribute('id', 'anaisUidList');\n" + @" dst.replaceChild(n, o);\n" + @"}\n" + @"function addUid(division, cn, dn, email, uid, sn) {\n" + @" if(!uid)\n" + @" uid='helge';\n" + @" var td = document.getElementById('anaisUidList');\n" + @" if(td.hasChildNodes())\n" + @" uid=', '+uid;\n" + @" var text = document.createTextNode(uid);\n" + @" td.appendChild(text);\n" + @"}\n" + @""; + return script; +} + +@end diff --git a/SOGo/UI/Anais/AnaisUidSelector.wox b/SOGo/UI/Anais/AnaisUidSelector.wox new file mode 100644 index 00000000..ac691ebc --- /dev/null +++ b/SOGo/UI/Anais/AnaisUidSelector.wox @@ -0,0 +1,51 @@ + + + + + + + + + + +
+ + + + + + + +
+ + + + + + + + +
+
+ + + +
diff --git a/SOGo/UI/Anais/ChangeLog b/SOGo/UI/Anais/ChangeLog index a3e53f0a..677db86e 100644 --- a/SOGo/UI/Anais/ChangeLog +++ b/SOGo/UI/Anais/ChangeLog @@ -1,5 +1,11 @@ 2004-08-11 Marcus Mueller + * AnaisUidSelector.[m|wox]: added (v0.9.1) + +2004-08-11 Marcus Mueller + + * v0.9.0 + * AnaisSelector.[m|wox]: added several associations used for uniquing the selector and one for preselecting a certain division (LDAP). diff --git a/SOGo/UI/Anais/GNUmakefile b/SOGo/UI/Anais/GNUmakefile index a6d97f8e..554bf368 100644 --- a/SOGo/UI/Anais/GNUmakefile +++ b/SOGo/UI/Anais/GNUmakefile @@ -11,12 +11,14 @@ AnaisUI_PRINCIPAL_CLASS = AnaisUIProduct AnaisUI_OBJC_FILES += \ AnaisUIProduct.m \ AnaisSelector.m \ + AnaisUidSelector.m \ AnaisUI_RESOURCE_FILES += \ Version \ product.plist \ AnaisSelector.wox \ + AnaisUidSelector.wox \ ADDITIONAL_INCLUDE_DIRS += \ diff --git a/SOGo/UI/Anais/Version b/SOGo/UI/Anais/Version index 399c230a..a5a61468 100644 --- a/SOGo/UI/Anais/Version +++ b/SOGo/UI/Anais/Version @@ -1,3 +1,3 @@ # $Id: Version 165 2004-08-05 17:55:50Z znek $ -SUBMINOR_VERSION:=0 +SUBMINOR_VERSION:=1 diff --git a/SOGo/UI/Common/ChangeLog b/SOGo/UI/Common/ChangeLog index f9a7ee8c..64c4a54c 100644 --- a/SOGo/UI/Common/ChangeLog +++ b/SOGo/UI/Common/ChangeLog @@ -1,3 +1,7 @@ +2004-08-11 Marcus Mueller + + * UIxPageFrame.wox, UIxAppNavView.m: added labels (v0.9.9) + 2004-08-11 * UIxPageFrame: minor fixes to UI (v0.9.8) diff --git a/SOGo/UI/Common/UIxAppNavView.m b/SOGo/UI/Common/UIxAppNavView.m index e8cb9eb2..7aa13d65 100644 --- a/SOGo/UI/Common/UIxAppNavView.m +++ b/SOGo/UI/Common/UIxAppNavView.m @@ -20,9 +20,9 @@ */ // $Id$ -#include +#include -@interface UIxAppNavView : WOComponent +@interface UIxAppNavView : UIxComponent { id element; id lastElement; @@ -75,7 +75,8 @@ name = [obj davDisplayName]; if ([name length] == 0) name = NSStringFromClass([obj class]); - + name = [self labelForKey:name]; + if (![name hasPrefix:@"sogod"]) { NSMutableDictionary *c; NSString *url; diff --git a/SOGo/UI/Common/UIxPageFrame.wox b/SOGo/UI/Common/UIxPageFrame.wox index 82b6d2dd..700b1705 100644 --- a/SOGo/UI/Common/UIxPageFrame.wox +++ b/SOGo/UI/Common/UIxPageFrame.wox @@ -3,6 +3,7 @@ xmlns:var="http://www.skyrix.com/od/binding" xmlns:const="http://www.skyrix.com/od/constant" xmlns:rsrc="OGo:url" + xmlns:label="OGo:label" > @@ -117,7 +118,7 @@ <font class="skydockfont"> <a var:href="userRootURL" class="skydockfont" - >Contacts</a> + ><var:string label:value="Contacts" /></a> </font> </td> </tr> @@ -126,7 +127,7 @@ <font class="skydockfont"> <a var:href="calendarRootURL" class="skyDockFont" - >Calendar</a> + ><var:string label:value="Calendar" /></a> </font> </td> </tr> @@ -182,7 +183,8 @@ > <tr> <td> - <font class="skydockfont">Misc</font> + <font class="skydockfont" + ><var:string label:value="Misc" /></font> </td> </tr> <tr> diff --git a/SOGo/UI/Scheduler/ChangeLog b/SOGo/UI/Scheduler/ChangeLog index e25b9d1c..0ef40a91 100644 --- a/SOGo/UI/Scheduler/ChangeLog +++ b/SOGo/UI/Scheduler/ChangeLog @@ -1,3 +1,11 @@ +2004-08-11 Marcus Mueller <znek@mulle-kybernetik.com> + + * v0.9.18 + + * UIxCalWeekOverview.wox: added AnaisUidSelector + + * English.lproj/default.strings: more labels + 2004-08-11 Marcus Mueller <znek@mulle-kybernetik.com> * v0.9.17 diff --git a/SOGo/UI/Scheduler/English.lproj/default.strings b/SOGo/UI/Scheduler/English.lproj/default.strings index 4082bcaf..854f6c84 100644 --- a/SOGo/UI/Scheduler/English.lproj/default.strings +++ b/SOGo/UI/Scheduler/English.lproj/default.strings @@ -62,12 +62,17 @@ "this year" = "this year"; +/* Menu */ + +"Calendar" = "Calendar"; +"Contacts" = "Contacts"; + + /* Misc */ "new" = "new"; "printview" = "printview"; "proposal" = "proposal"; -"Calendar" = "Calendar"; "Save" = "Save"; diff --git a/SOGo/UI/Scheduler/UIxCalWeekOverview.wox b/SOGo/UI/Scheduler/UIxCalWeekOverview.wox index 9a8b42c8..38bcbfad 100644 --- a/SOGo/UI/Scheduler/UIxCalWeekOverview.wox +++ b/SOGo/UI/Scheduler/UIxCalWeekOverview.wox @@ -32,7 +32,11 @@ <td id="skywinbodycell" class="wincontent"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr bgcolor="#e8e8e0"> - <td align="left" valign="middle" width="80%">TODO: controls</td><!-- 99% --> + <td align="left" valign="middle" width="80%"> + <var:component className="AnaisUidSelector" + calendarUIDs="clientObject.calendarUIDs" + /> + </td><!-- 99% --> <td align="right"> <var:component className="UIxCalBackForthNavView" methodName="ownMethodName"