From efbd496ee3b92963e8f0f919c2f02f46558d3037 Mon Sep 17 00:00:00 2001 From: znek Date: Sat, 14 Aug 2004 20:14:58 +0000 Subject: [PATCH] refined redirects/navigation, cancel button git-svn-id: http://svn.opengroupware.org/SOGo/trunk@215 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/UI/Common/ChangeLog | 5 ++++ SOGo/UI/Common/UIxPageFrame.m | 4 ++- SOGo/UI/Common/Version | 2 +- SOGo/UI/Scheduler/ChangeLog | 13 +++++++++ .../Scheduler/English.lproj/default.strings | 10 ++++--- SOGo/UI/Scheduler/UIxAppointmentEditor.m | 2 +- SOGo/UI/Scheduler/UIxAppointmentEditor.wox | 9 +++++-- SOGo/UI/Scheduler/UIxCalView.m | 27 ++++++++++++++++--- SOGo/UI/Scheduler/Version | 2 +- 9 files changed, 60 insertions(+), 14 deletions(-) diff --git a/SOGo/UI/Common/ChangeLog b/SOGo/UI/Common/ChangeLog index ea6afae1..bca248fc 100644 --- a/SOGo/UI/Common/ChangeLog +++ b/SOGo/UI/Common/ChangeLog @@ -1,3 +1,8 @@ +2004-08-14 Marcus Mueller + + * UIxPageFrame.m: -title returns label for "OpenGroupware.org" when + -isUIxDebugEnabled is NO. (v0.9.13) + 2004-08-12 Marcus Mueller * UIxPageFrame.wox: removed left side navigation completely as it diff --git a/SOGo/UI/Common/UIxPageFrame.m b/SOGo/UI/Common/UIxPageFrame.m index 6f538e02..380d73a7 100644 --- a/SOGo/UI/Common/UIxPageFrame.m +++ b/SOGo/UI/Common/UIxPageFrame.m @@ -33,7 +33,9 @@ ASSIGN(self->title, _value); } - (NSString *)title { - return self->title; + if([self isUIxDebugEnabled]) + return self->title; + return [self labelForKey:@"OpenGroupware.org"]; } /* URL generation */ diff --git a/SOGo/UI/Common/Version b/SOGo/UI/Common/Version index 9cef7993..92c8fa08 100644 --- a/SOGo/UI/Common/Version +++ b/SOGo/UI/Common/Version @@ -1,3 +1,3 @@ # $Id$ -SUBMINOR_VERSION:=12 +SUBMINOR_VERSION:=13 diff --git a/SOGo/UI/Scheduler/ChangeLog b/SOGo/UI/Scheduler/ChangeLog index a2e32b27..cfc807ff 100644 --- a/SOGo/UI/Scheduler/ChangeLog +++ b/SOGo/UI/Scheduler/ChangeLog @@ -1,3 +1,16 @@ +2004-08-14 Marcus Mueller + + * v0.9.37 + + * English.lproj/default.strings: new labels + + * UIxAppointmentEditor.m: after save, return to ".." instead of "view" + + * UIxAppointmentEditor.wox: added "Cancel" button. + + * UIxCalView.m: refined behaviour of redirects according to Helge's + request. + 2004-08-14 Marcus Mueller * UIxAppointmentEditor.m: Changed "X-OGo-RESOURCE" into diff --git a/SOGo/UI/Scheduler/English.lproj/default.strings b/SOGo/UI/Scheduler/English.lproj/default.strings index 854f6c84..a308c1c0 100644 --- a/SOGo/UI/Scheduler/English.lproj/default.strings +++ b/SOGo/UI/Scheduler/English.lproj/default.strings @@ -70,10 +70,12 @@ /* Misc */ -"new" = "new"; -"printview" = "printview"; -"proposal" = "proposal"; -"Save" = "Save"; +"new" = "new"; +"printview" = "printview"; +"proposal" = "proposal"; +"Save" = "Save"; +"Cancel" = "Cancel"; +"OpenGroupware.org" = "OpenGroupware.org" /* Appointments */ diff --git a/SOGo/UI/Scheduler/UIxAppointmentEditor.m b/SOGo/UI/Scheduler/UIxAppointmentEditor.m index b3f85406..12c296cb 100644 --- a/SOGo/UI/Scheduler/UIxAppointmentEditor.m +++ b/SOGo/UI/Scheduler/UIxAppointmentEditor.m @@ -426,7 +426,7 @@ // TODO: add some error handling in form! (eg like in Zope) } - uri = [self _completeURIForMethod:@"view"]; + uri = [self _completeURIForMethod:@".."]; return [self redirectToLocation:uri]; } diff --git a/SOGo/UI/Scheduler/UIxAppointmentEditor.wox b/SOGo/UI/Scheduler/UIxAppointmentEditor.wox index 3ac73b49..063e6f32 100644 --- a/SOGo/UI/Scheduler/UIxAppointmentEditor.wox +++ b/SOGo/UI/Scheduler/UIxAppointmentEditor.wox @@ -259,11 +259,16 @@ - - + + + + +
diff --git a/SOGo/UI/Scheduler/UIxCalView.m b/SOGo/UI/Scheduler/UIxCalView.m index 8aa76178..9cef50ae 100644 --- a/SOGo/UI/Scheduler/UIxCalView.m +++ b/SOGo/UI/Scheduler/UIxCalView.m @@ -404,6 +404,7 @@ static BOOL shouldDisplayWeekend = NO; NSString *uidsString, *loc, *prevMethod; WORequest *req; id r; + BOOL useGroups; req = [[self context] request]; @@ -415,12 +416,30 @@ static BOOL shouldDisplayWeekend = NO; prevMethod = @""; uri = [[NSMutableString alloc] initWithString:[self _userFolderURI]]; - if(!(([uidsString length] == 0) || - ([[uri lastPathComponent] isEqualToString:uidsString]))) { - [uri appendString:@"/Groups/_custom_"]; + /* if we have more than one entry, use groups - otherwise don't */ + useGroups = [uidsString rangeOfString:@","].length > 0; + + if(useGroups) { + [uri appendString:@"Groups/_custom_"]; [uri appendString:uidsString]; + [uri appendString:@"/"]; + } + else { + /* check if lastPathComponent is the base that we want to have */ + if((([uidsString length] != 0) && + (![[uri lastPathComponent] isEqualToString:uidsString]))) { + NSRange r; + + /* uri ends with an '/', so we have to adjust the range a little */ + r = NSMakeRange(0, [uri length] - 1); + r = [uri rangeOfString:@"/" + options:NSBackwardsSearch + range:r]; + r = NSMakeRange(r.location + 1, [uri length] - r.location - 2); + [uri replaceCharactersInRange:r withString:uidsString]; + } } - [uri appendString:@"/Calendar/"]; + [uri appendString:@"Calendar/"]; [uri appendString:prevMethod]; #if 0 diff --git a/SOGo/UI/Scheduler/Version b/SOGo/UI/Scheduler/Version index 4d40cd2f..4b9056fc 100644 --- a/SOGo/UI/Scheduler/Version +++ b/SOGo/UI/Scheduler/Version @@ -1,6 +1,6 @@ # $Id$ -SUBMINOR_VERSION:=36 +SUBMINOR_VERSION:=37 # v0.9.31 requires libWEExtensions v4.2.52 # v0.9.29 requires libWEExtensions v4.2.51 -- 2.39.5