From ff1944d09d68e5e2b38f6579f9c4c8fd07292c41 Mon Sep 17 00:00:00 2001 From: znek Date: Fri, 18 Jun 2004 10:46:35 +0000 Subject: [PATCH] Fixed month navigation, some pretty printing git-svn-id: http://svn.opengroupware.org/SOGo/trunk@49 d1b88da0-ebda-0310-925b-ed51d893ca5b --- ZideStore/UI-X/ChangeLog | 17 +++++++ ZideStore/UI-X/Common/OGoComponent.h | 5 +- ZideStore/UI-X/Common/OGoComponent.m | 12 +++++ .../UI-X/Scheduler/OGoCalMonthOverview.wox | 13 +++++- ZideStore/UI-X/Scheduler/OGoCalMonthView.h | 4 ++ ZideStore/UI-X/Scheduler/OGoCalMonthView.m | 46 ++++++++----------- ZideStore/UI-X/Scheduler/OGoCalSelectTab.m | 14 ------ ZideStore/UI-X/Scheduler/OGoCalView.m | 7 +++ .../UI-X/Scheduler/OGoCalWeekOverview.wox | 10 +++- ZideStore/UI-X/Scheduler/OGoCalWeekView.m | 7 --- 10 files changed, 84 insertions(+), 51 deletions(-) diff --git a/ZideStore/UI-X/ChangeLog b/ZideStore/UI-X/ChangeLog index d3a8eec8..483f30a8 100644 --- a/ZideStore/UI-X/ChangeLog +++ b/ZideStore/UI-X/ChangeLog @@ -1,3 +1,20 @@ +2004-06-18 Marcus Mueller + + * Common/OGoComponent.[hm]: new component which serves as a base + component for calendar components now. Knows how to deal with + queryParameters and offers url construction method(s). + + * All existing components have been rewritten to use queryParameters + instead of hardcoded strings where this is feasible. This provides + future extensibility and flexibility. + + * Handling of dates has been fixed to center around the use of a + 'day' parameter. startDate/endDate are coupled to this, but + don't override it as it's the duty of the individual view to set + its (feasible) ranges accordingly. The new behaviour is noticable + in the calendar selection tabview instantly, as it now replicates + what OGo does. + 2004-06-16 Marcus Mueller * Common/OGoAppNavView.m: construct URL correctly. diff --git a/ZideStore/UI-X/Common/OGoComponent.h b/ZideStore/UI-X/Common/OGoComponent.h index 86795fdf..e5323457 100644 --- a/ZideStore/UI-X/Common/OGoComponent.h +++ b/ZideStore/UI-X/Common/OGoComponent.h @@ -35,9 +35,12 @@ - (NSString *)queryParameterForKey:(NSString *)_key; - (NSDictionary *)queryParameters; -/* use this to set permanent query parameters */ +/* use this to set 'sticky' query parameters */ - (void)setQueryParameter:(NSString *)_param forKey:(NSString *)_key; +/* appends queryParameters to _method if any are set */ +- (NSString *)completeHrefForMethod:(NSString *)_method; + @end #endif /* __OGoComponent_H_ */ diff --git a/ZideStore/UI-X/Common/OGoComponent.m b/ZideStore/UI-X/Common/OGoComponent.m index e6b4e621..9e422ae6 100644 --- a/ZideStore/UI-X/Common/OGoComponent.m +++ b/ZideStore/UI-X/Common/OGoComponent.m @@ -108,4 +108,16 @@ return self->queryParameters; } +- (NSString *)completeHrefForMethod:(NSString *)_method { + NSDictionary *qp; + NSString *qs; + + qp = [self queryParameters]; + if([qp count] == 0) + return _method; + + qs = [[self context] queryStringFromDictionary:qp]; + return [_method stringByAppendingFormat:@"?%@", qs]; +} + @end diff --git a/ZideStore/UI-X/Scheduler/OGoCalMonthOverview.wox b/ZideStore/UI-X/Scheduler/OGoCalMonthOverview.wox index ef612d31..b863898c 100644 --- a/ZideStore/UI-X/Scheduler/OGoCalMonthOverview.wox +++ b/ZideStore/UI-X/Scheduler/OGoCalMonthOverview.wox @@ -27,7 +27,13 @@ TODO: controls - + @@ -39,7 +45,10 @@
- + TODO: controls - +
@@ -96,8 +102,10 @@ +