From: znek Date: Tue, 27 Jul 2004 12:27:30 +0000 (+0000) Subject: overall fix for the navigation X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f91812b4bbbc546566aeef756e78f739969775fa;p=scalable-opengroupware.org overall fix for the navigation git-svn-id: http://svn.opengroupware.org/SOGo/trunk@158 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/Main/ChangeLog b/SOGo/Main/ChangeLog index faf0d466..723de465 100644 --- a/SOGo/Main/ChangeLog +++ b/SOGo/Main/ChangeLog @@ -1,3 +1,7 @@ +2004-07-27 Marcus Mueller + + * sogod.m: added static SoRootURL to context (v0.9.4) + 2004-07-19 Marcus Mueller * sogod.m, */Locale: converted to UTF-8 for better editability (v0.9.3) diff --git a/SOGo/Main/GNUmakefile b/SOGo/Main/GNUmakefile index f2949980..cedd1b32 100644 --- a/SOGo/Main/GNUmakefile +++ b/SOGo/Main/GNUmakefile @@ -1,4 +1,4 @@ -# $Id: GNUmakefile,v 1.13 2004/06/08 11:41:13 helge Exp $ +# $Id$ include $(GNUSTEP_MAKEFILES)/common.make diff --git a/SOGo/Main/Version b/SOGo/Main/Version index fc795f55..749d66dc 100644 --- a/SOGo/Main/Version +++ b/SOGo/Main/Version @@ -1,3 +1,3 @@ # $Id$ -SUBMINOR_VERSION:=3 +SUBMINOR_VERSION:=4 diff --git a/SOGo/Main/sogod.m b/SOGo/Main/sogod.m index 84d2a7fe..15646454 100644 --- a/SOGo/Main/sogod.m +++ b/SOGo/Main/sogod.m @@ -117,6 +117,11 @@ static BOOL doCrashOnSessionCreate = NO; locale = [self currentLocaleConsideringLanguages:langs]; [_ctx takeValue:locale forKey:@"locale"]; } + + /* set SoRootURL */ + if(![_ctx valueForKey:@"SoRootURL"]) { + [_ctx takeValue:@"/sogod.woa/so/" forKey:@"SoRootURL"]; + } /* first check attributes directly bound to the application */ if ((obj = [super lookupName:_key inContext:_ctx acquire:_flag])) return obj; diff --git a/SOGo/UI/Common/ChangeLog b/SOGo/UI/Common/ChangeLog index 1431b1fa..39381c5c 100644 --- a/SOGo/UI/Common/ChangeLog +++ b/SOGo/UI/Common/ChangeLog @@ -1,3 +1,15 @@ +2004-07-27 Marcus Mueller + + * v0.9.2 + + * UIxPageFrame.m: added convenience methods to access specific parts + of the URL. + + * UIxPageFrame.wox: fixed navigation URLs. Inserted references to + rootURL where no content is currently available. + + * UIxAppNavView.m: enhanced construction of navigation url path. + 2004-07-26 Marcus Mueller * calendar.css: added styles for dayoverview's content. diff --git a/SOGo/UI/Common/UIxAppNavView.m b/SOGo/UI/Common/UIxAppNavView.m index 54d3930e..2094c588 100644 --- a/SOGo/UI/Common/UIxAppNavView.m +++ b/SOGo/UI/Common/UIxAppNavView.m @@ -78,10 +78,15 @@ if (![name hasPrefix:@"sogod"]) { NSMutableDictionary *c; - + NSString *url; + + url = [obj baseURLInContext:[self context]]; + if(![url hasSuffix:@"/"]) { + url = [url stringByAppendingString:@"/"]; + } c = [[NSMutableDictionary alloc] initWithCapacity:2]; [c setObject:name forKey:@"name"]; - [c setObject:[obj baseURLInContext:[self context]] forKey:@"url"]; + [c setObject:url forKey:@"url"]; [navPathComponents addObject:c]; [c release]; } diff --git a/SOGo/UI/Common/UIxPageFrame.m b/SOGo/UI/Common/UIxPageFrame.m index ba39e5f4..089440db 100644 --- a/SOGo/UI/Common/UIxPageFrame.m +++ b/SOGo/UI/Common/UIxPageFrame.m @@ -7,9 +7,16 @@ @interface UIxPageFrame : SoComponent { - NSString *title; + NSString *title; + NSString *rootURL; + NSString *userRootURL; } +- (SoUser *)user; +- (NSString *)rootURL; +- (NSString *)userRootURL; +- (NSString *)calendarRootURL; + @end #include "common.h" @@ -18,6 +25,8 @@ - (void)dealloc { [self->title release]; + [self->rootURL release]; + [self->userRootURL release]; [super dealloc]; } @@ -26,19 +35,52 @@ - (void)setTitle:(NSString *)_value { ASSIGN(self->title, _value); } - - (NSString *)title { return self->title; } -- (NSString *)login { +- (SoUser *)user { WOContext *ctx; - SoUser *user; ctx = [self context]; - user = [[[self clientObject] authenticatorInContext:ctx] + return [[[self clientObject] authenticatorInContext:ctx] userInContext:ctx]; - return [user login]; } +- (NSString *)rootURL { + WOContext *ctx; + NSArray *traversalObjects; + + if(self->rootURL) + return self->rootURL; + + ctx = [self context]; + traversalObjects = [ctx objectTraversalStack]; + self->rootURL = [[[traversalObjects objectAtIndex:0] + rootURLInContext:ctx] + retain]; + return self->rootURL; +} + +- (NSString *)userRootURL { + WOContext *ctx; + NSArray *traversalObjects; + + if(self->userRootURL) + return self->userRootURL; + + ctx = [self context]; + traversalObjects = [ctx objectTraversalStack]; + self->userRootURL = [[[[traversalObjects objectAtIndex:1] + baseURLInContext:ctx] + stringByAppendingString:@"/"] + retain]; + return self->userRootURL; +} + +- (NSString *)calendarRootURL { + return [[self userRootURL] stringByAppendingString:@"Calendar/"]; +} + + @end /* UIxPageFrame */ diff --git a/SOGo/UI/Common/UIxPageFrame.wox b/SOGo/UI/Common/UIxPageFrame.wox index 622ecbab..3d424da4 100644 --- a/SOGo/UI/Common/UIxPageFrame.wox +++ b/SOGo/UI/Common/UIxPageFrame.wox @@ -78,7 +78,7 @@ - SOGo () + SOGo () @@ -105,42 +105,42 @@ - News + News - Projects + Projects - Contacts + Contacts - Companies + Companies - Calendar + Calendar - Tasks + Tasks @@ -215,32 +215,32 @@ - New Email + New Email - Inbox + Inbox - Preferences + Preferences - Home + Home - Desktop + Desktop - Logout + Logout @@ -289,15 +289,17 @@ - 2000-2004 SKYRIX Software AG. - We welcome your - feedback. - + 2000-2004 SKYRIX Software AG. We welcome your feedback. + - No sessions required! ;-) - + No sessions required! ;-) + diff --git a/SOGo/UI/Common/Version b/SOGo/UI/Common/Version index d64ce5ad..2c9bdd95 100644 --- a/SOGo/UI/Common/Version +++ b/SOGo/UI/Common/Version @@ -1,5 +1,5 @@ # $Id: Version,v 1.1 2003/11/24 01:24:40 helge Exp $ -SUBMINOR_VERSION:=1 +SUBMINOR_VERSION:=2 # 1.1.0 requires NGObjWeb 4.2.202