From ef5a666e6232eb2812d7f6c54f50155f219cc2da Mon Sep 17 00:00:00 2001 From: znek Date: Mon, 7 Jun 2004 08:49:26 +0000 Subject: [PATCH] Added ZideStore -> UI-X -> Scheduler git-svn-id: http://svn.opengroupware.org/SOGo/trunk@11 d1b88da0-ebda-0310-925b-ed51d893ca5b --- ZideStore/UI-X/ChangeLog | 33 ++++ ZideStore/UI-X/Scheduler/GNUmakefile | 53 ++++++ .../UI-X/Scheduler/GNUmakefile.postamble | 10 ++ ZideStore/UI-X/Scheduler/NOTES | 12 ++ ZideStore/UI-X/Scheduler/OGoAppointmentView.h | 14 ++ ZideStore/UI-X/Scheduler/OGoAppointmentView.m | 23 +++ .../UI-X/Scheduler/OGoAppointmentView.wox | 29 ++++ ZideStore/UI-X/Scheduler/OGoAptTableView.m | 75 +++++++++ ZideStore/UI-X/Scheduler/OGoAptTableView.wox | 34 ++++ .../UI-X/Scheduler/OGoCalMonthOverview.m | 19 +++ .../UI-X/Scheduler/OGoCalMonthOverview.wox | 45 +++++ ZideStore/UI-X/Scheduler/OGoCalMonthView.h | 20 +++ ZideStore/UI-X/Scheduler/OGoCalMonthView.m | 52 ++++++ ZideStore/UI-X/Scheduler/OGoCalView.h | 46 ++++++ ZideStore/UI-X/Scheduler/OGoCalView.m | 156 ++++++++++++++++++ ZideStore/UI-X/Scheduler/OGoCalWeekOverview.m | 40 +++++ .../UI-X/Scheduler/OGoCalWeekOverview.wox | 51 ++++++ ZideStore/UI-X/Scheduler/OGoCalWeekView.h | 19 +++ ZideStore/UI-X/Scheduler/OGoCalWeekView.m | 50 ++++++ ZideStore/UI-X/Scheduler/SchedulerUIProduct.m | 34 ++++ ZideStore/UI-X/Scheduler/Version | 5 + ZideStore/UI-X/Scheduler/bundle-info.plist | 20 +++ ZideStore/UI-X/Scheduler/common.h | 35 ++++ ZideStore/UI-X/Scheduler/images/next_week.gif | Bin 0 -> 121 bytes .../UI-X/Scheduler/images/previous_week.gif | Bin 0 -> 121 bytes ZideStore/UI-X/Scheduler/product.plist | 35 ++++ 26 files changed, 910 insertions(+) create mode 100644 ZideStore/UI-X/ChangeLog create mode 100644 ZideStore/UI-X/Scheduler/GNUmakefile create mode 100644 ZideStore/UI-X/Scheduler/GNUmakefile.postamble create mode 100644 ZideStore/UI-X/Scheduler/NOTES create mode 100644 ZideStore/UI-X/Scheduler/OGoAppointmentView.h create mode 100644 ZideStore/UI-X/Scheduler/OGoAppointmentView.m create mode 100644 ZideStore/UI-X/Scheduler/OGoAppointmentView.wox create mode 100644 ZideStore/UI-X/Scheduler/OGoAptTableView.m create mode 100644 ZideStore/UI-X/Scheduler/OGoAptTableView.wox create mode 100644 ZideStore/UI-X/Scheduler/OGoCalMonthOverview.m create mode 100644 ZideStore/UI-X/Scheduler/OGoCalMonthOverview.wox create mode 100644 ZideStore/UI-X/Scheduler/OGoCalMonthView.h create mode 100644 ZideStore/UI-X/Scheduler/OGoCalMonthView.m create mode 100644 ZideStore/UI-X/Scheduler/OGoCalView.h create mode 100644 ZideStore/UI-X/Scheduler/OGoCalView.m create mode 100644 ZideStore/UI-X/Scheduler/OGoCalWeekOverview.m create mode 100644 ZideStore/UI-X/Scheduler/OGoCalWeekOverview.wox create mode 100644 ZideStore/UI-X/Scheduler/OGoCalWeekView.h create mode 100644 ZideStore/UI-X/Scheduler/OGoCalWeekView.m create mode 100644 ZideStore/UI-X/Scheduler/SchedulerUIProduct.m create mode 100644 ZideStore/UI-X/Scheduler/Version create mode 100644 ZideStore/UI-X/Scheduler/bundle-info.plist create mode 100644 ZideStore/UI-X/Scheduler/common.h create mode 100644 ZideStore/UI-X/Scheduler/images/next_week.gif create mode 100644 ZideStore/UI-X/Scheduler/images/previous_week.gif create mode 100644 ZideStore/UI-X/Scheduler/product.plist diff --git a/ZideStore/UI-X/ChangeLog b/ZideStore/UI-X/ChangeLog new file mode 100644 index 00000000..ef4e0e42 --- /dev/null +++ b/ZideStore/UI-X/ChangeLog @@ -0,0 +1,33 @@ +2004-06-03 Helge Hess + + * Scheduler/OGoCalWeekOverview.m: moved navigation URL generation to + superclass (now generic because we use the 'ownMethodName'). Could + even be moved to OGoCalView? + + * Scheduler/OGoCalMonthView.m: added next/prev month URL generation + methods, calculate startdate from form value + + * Scheduler/OGoCalView.m: added -ownMethodName method to return the + last path component of the request URL (the SOPE method), eg + 'weekoverview' for OGoCalWeekView, added + -dateNavigationURLWithNewStartDate: method to calculate 'startDate' + URLs (should be improved to include existing query parameters!) + + * Scheduler/OGoCalWeekOverview.m: minor tweaks ;-) + +2004-06-03 Marcus Mueller + + * Scheduler/OGoCalWeekView.m: construct startDate from formValue, + otherwise use current week's monday as startDate. + + * Scheduler/OGoCalWeekOverview.wox: switch back/forth + + * Scheduler/OGoCalWeekOverview.m: provide URLs for switching back/forth + weekoverview. + + * Scheduler/OGoCalView.[hm]: methods for converting dates into strings + and vice versa. + + * Scheduler/OGoAppointmentView.m, Scheduler/OGoCalView.m: fixed include + + * ChangeLog: created diff --git a/ZideStore/UI-X/Scheduler/GNUmakefile b/ZideStore/UI-X/Scheduler/GNUmakefile new file mode 100644 index 00000000..05cd3b95 --- /dev/null +++ b/ZideStore/UI-X/Scheduler/GNUmakefile @@ -0,0 +1,53 @@ +# $Id: GNUmakefile,v 1.4 2004/06/04 16:15:23 znek Exp $ + +include $(GNUSTEP_MAKEFILES)/common.make + +BUNDLE_NAME = SchedulerUI +BUNDLE_EXTENSION = .zsp +BUNDLE_INSTALL_DIR = $(GNUSTEP_USER_ROOT)/Library/ZideStore12 + +SchedulerUI_PRINCIPAL_CLASS = SchedulerUIProduct + +SchedulerUI_OBJC_FILES = \ + SchedulerUIProduct.m \ + OGoCalView.m \ + OGoCalWeekView.m \ + OGoCalMonthView.m \ + OGoAptTableView.m \ + \ + OGoCalWeekOverview.m \ + OGoCalMonthOverview.m \ + OGoAppointmentView.m \ + +SchedulerUI_RESOURCE_FILES += \ + Version \ + product.plist \ + \ + OGoAptTableView.wox \ + OGoCalWeekOverview.wox \ + OGoCalMonthOverview.wox \ + OGoAppointmentView.wox \ + images/next_week.gif \ + images/previous_week.gif \ + +ZIDESTORE=../.. + +ADDITIONAL_INCLUDE_DIRS += \ + -I. \ + -I$(ZIDESTORE)/Frontend -I$(ZIDESTORE)/Backend -I$(ZIDESTORE) + +# make + +-include GNUmakefile.preamble +include $(GNUSTEP_MAKEFILES)/bundle.make +-include GNUmakefile.postamble + +ifneq ($(GNUSTEP_BUILD_DIR),) +after-all :: + @(cp bundle-info.plist \ + $(GNUSTEP_BUILD_DIR)/$(BUNDLE_NAME)$(BUNDLE_EXTENSION)) +else +after-all :: + @(cd $(BUNDLE_NAME)$(BUNDLE_EXTENSION);\ + cp ../bundle-info.plist .) +endif diff --git a/ZideStore/UI-X/Scheduler/GNUmakefile.postamble b/ZideStore/UI-X/Scheduler/GNUmakefile.postamble new file mode 100644 index 00000000..6e5a7f2a --- /dev/null +++ b/ZideStore/UI-X/Scheduler/GNUmakefile.postamble @@ -0,0 +1,10 @@ +# $Id: GNUmakefile.postamble,v 1.1 2004/05/12 14:45:56 helge Exp $ + +validate-wox: + xmllint --noout *.wox + +before-all :: validate-wox + +after-all :: + @(cd $(BUNDLE_NAME)$(BUNDLE_EXTENSION);\ + cp ../bundle-info.plist .) diff --git a/ZideStore/UI-X/Scheduler/NOTES b/ZideStore/UI-X/Scheduler/NOTES new file mode 100644 index 00000000..478e8986 --- /dev/null +++ b/ZideStore/UI-X/Scheduler/NOTES @@ -0,0 +1,12 @@ +// $Id: NOTES,v 1.1 2003/11/24 01:24:40 helge Exp $ + +URLs +==== + +/zidestore/ControlPanel/ => SoControlPanel +/zidestore/ControlPanel/Products => SoProductRegistry +/zidestore/ControlPanel/Products/ZideStoreUI => SoProduct +/zidestore/ControlPanel/Products/ZideStoreUI/Resources/ +=> SoProductResourceManager +/zidestore/ControlPanel/Products/ZideStoreUI/Resources/calendar.css +=> resource diff --git a/ZideStore/UI-X/Scheduler/OGoAppointmentView.h b/ZideStore/UI-X/Scheduler/OGoAppointmentView.h new file mode 100644 index 00000000..b4a220d0 --- /dev/null +++ b/ZideStore/UI-X/Scheduler/OGoAppointmentView.h @@ -0,0 +1,14 @@ +// $Id: OGoAppointmentView.h,v 1.1 2003/11/24 01:24:40 helge Exp $ + +#ifndef __ZideStoreUI_OGoAppointmentView_H__ +#define __ZideStoreUI_OGoAppointmentView_H__ + +#include + +@interface OGoAppointmentView : SoComponent +{ +} + +@end + +#endif /* __ZideStoreUI_OGoAppointmentView_H__ */ diff --git a/ZideStore/UI-X/Scheduler/OGoAppointmentView.m b/ZideStore/UI-X/Scheduler/OGoAppointmentView.m new file mode 100644 index 00000000..23f5b342 --- /dev/null +++ b/ZideStore/UI-X/Scheduler/OGoAppointmentView.m @@ -0,0 +1,23 @@ +// $Id: OGoAppointmentView.m,v 1.2 2004/06/03 16:42:38 znek Exp $ + +#include "OGoAppointmentView.h" +#include "common.h" +#include + +@interface NSObject(UsedPrivates) +- (SxAptManager *)aptManagerInContext:(id)_ctx; +@end + +@implementation OGoAppointmentView + +- (void)dealloc { + [super dealloc]; +} + +/* backend */ + +- (SxAptManager *)aptManager { + return [[self clientObject] aptManagerInContext:[self context]]; +} + +@end /* OGoAppointmentView */ diff --git a/ZideStore/UI-X/Scheduler/OGoAppointmentView.wox b/ZideStore/UI-X/Scheduler/OGoAppointmentView.wox new file mode 100644 index 00000000..8599707a --- /dev/null +++ b/ZideStore/UI-X/Scheduler/OGoAppointmentView.wox @@ -0,0 +1,29 @@ + + + week + month +
+

Appointment Viewer

+ OGo ZideStore Server - +
+ Client: +
+ Group:
+ Deletable:
+ Generation:
+ MsgClass:
+ +
+ + As iCal:
+
+ +
+ + As Mail:
+
+
diff --git a/ZideStore/UI-X/Scheduler/OGoAptTableView.m b/ZideStore/UI-X/Scheduler/OGoAptTableView.m new file mode 100644 index 00000000..ad4bf537 --- /dev/null +++ b/ZideStore/UI-X/Scheduler/OGoAptTableView.m @@ -0,0 +1,75 @@ +/* + Copyright (C) 2000-2003 SKYRIX Software AG + + This file is part of OGo + + 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: OGoAptTableView.m,v 1.1 2003/11/24 01:37:06 helge Exp $ + +#include + +@class NSArray, NSCalendarDate; + +@interface OGoAptTableView : SoComponent +{ + NSArray *appointments; + id appointment; +} + +/* accessors */ + +- (NSArray *)appointments; +- (id)appointment; + +@end + +#include "common.h" + +@implementation OGoAptTableView + +- (void)dealloc { + [self->appointment release]; + [self->appointments release]; + [super dealloc]; +} + +/* accessors */ + +- (void)setAppointments:(NSArray *)_apts { + ASSIGN(self->appointments, _apts); +} +- (NSArray *)appointments { + return self->appointments; +} + +- (void)setAppointment:(id)_apt { + ASSIGN(self->appointment, _apt); +} +- (id)appointment { + return self->appointment; +} + +- (NSString *)appointmentViewURL { + id pkey; + + if ((pkey = [[self appointment] valueForKey:@"dateId"]) == nil) + return nil; + + return [NSString stringWithFormat:@"%@/view", pkey]; +} + +@end /* OGoAptTableView */ diff --git a/ZideStore/UI-X/Scheduler/OGoAptTableView.wox b/ZideStore/UI-X/Scheduler/OGoAptTableView.wox new file mode 100644 index 00000000..e270edfc --- /dev/null +++ b/ZideStore/UI-X/Scheduler/OGoAptTableView.wox @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + +
IDTitleTimeVersionLocation
+ + + + - + +
diff --git a/ZideStore/UI-X/Scheduler/OGoCalMonthOverview.m b/ZideStore/UI-X/Scheduler/OGoCalMonthOverview.m new file mode 100644 index 00000000..d2146a7e --- /dev/null +++ b/ZideStore/UI-X/Scheduler/OGoCalMonthOverview.m @@ -0,0 +1,19 @@ +// $Id: OGoCalMonthOverview.m,v 1.1 2003/11/24 01:24:40 helge Exp $ + +#include "OGoCalMonthView.h" + +@interface OGoCalMonthOverview : OGoCalMonthView +{ +} + +@end + +#include "common.h" + +@implementation OGoCalMonthOverview + +- (NSArray *)appointments { + return [self fetchCoreInfos]; +} + +@end /* OGoCalMonthOverview */ diff --git a/ZideStore/UI-X/Scheduler/OGoCalMonthOverview.wox b/ZideStore/UI-X/Scheduler/OGoCalMonthOverview.wox new file mode 100644 index 00000000..6b98aeec --- /dev/null +++ b/ZideStore/UI-X/Scheduler/OGoCalMonthOverview.wox @@ -0,0 +1,45 @@ + + + week +
+ OGo ZideStore Server - +
+ Client: +
+ Appointments: # + from + to +
+ +
+ + + * + +
+ + + + + + +
+ + Appointments: + + + + diff --git a/ZideStore/UI-X/Scheduler/OGoCalMonthView.h b/ZideStore/UI-X/Scheduler/OGoCalMonthView.h new file mode 100644 index 00000000..a4ba3ac8 --- /dev/null +++ b/ZideStore/UI-X/Scheduler/OGoCalMonthView.h @@ -0,0 +1,20 @@ +// $Id: OGoCalMonthView.h,v 1.2 2004/06/03 21:56:44 helge Exp $ + +#ifndef __ZideStoreUI_OGoCalMonthView_H__ +#define __ZideStoreUI_OGoCalMonthView_H__ + +#include "OGoCalView.h" + +/* + OGoCalMonthView + + Abstract superclass for views which display months. +*/ + +@interface OGoCalMonthView : OGoCalView +{ +} + +@end + +#endif /* __ZideStoreUI_OGoCalMonthView_H__ */ diff --git a/ZideStore/UI-X/Scheduler/OGoCalMonthView.m b/ZideStore/UI-X/Scheduler/OGoCalMonthView.m new file mode 100644 index 00000000..a1496bce --- /dev/null +++ b/ZideStore/UI-X/Scheduler/OGoCalMonthView.m @@ -0,0 +1,52 @@ +// $Id: OGoCalMonthView.m,v 1.2 2004/06/03 21:56:44 helge Exp $ + +#include "OGoCalMonthView.h" +#include "common.h" + +@implementation OGoCalMonthView + +// TODO: look how to properly calculate month range! + +- (NSCalendarDate *)startDate { + // TODO: copy of the startdate method + NSCalendarDate *startDate; + NSString *dateString; + + dateString = [[[self context] request] formValueForKey:@"startDate"]; + startDate = dateString + ? [self dateForDateString:dateString] + : [[NSCalendarDate date] mondayOfWeek]; + + return startDate; +} +- (NSCalendarDate *)endDate { + return [[self startDate] dateByAddingYears:0 months:0 days:31 + hours:0 minutes:0 seconds:0]; +} + +/* URLs (TODO: fix scroll ranges for months!) */ + +- (NSString *)prevMonthURL { + NSCalendarDate *newMonthDate; + + newMonthDate = [[self startDate] dateByAddingYears:0 months:0 days:-31 + hours:0 minutes:0 seconds:0]; + return [self dateNavigationURLWithNewStartDate:newMonthDate]; +} + +- (NSString *)nextMonthURL { + NSCalendarDate *newMonthDate; + + newMonthDate = [[self startDate] dateByAddingYears:0 months:0 days:31 + hours:0 minutes:0 seconds:0]; + return [self dateNavigationURLWithNewStartDate:newMonthDate]; +} + +- (NSString *)thisMonthURL { + NSCalendarDate *newMonthDate; + + newMonthDate = [[NSCalendarDate date] mondayOfWeek]; + return [self dateNavigationURLWithNewStartDate:newMonthDate]; +} + +@end /* OGoCalMonthView */ diff --git a/ZideStore/UI-X/Scheduler/OGoCalView.h b/ZideStore/UI-X/Scheduler/OGoCalView.h new file mode 100644 index 00000000..a5d99746 --- /dev/null +++ b/ZideStore/UI-X/Scheduler/OGoCalView.h @@ -0,0 +1,46 @@ +// $Id: OGoCalView.h,v 1.3 2004/06/03 21:56:44 helge Exp $ + +#ifndef __ZideStoreUI_OGoCalView_H__ +#define __ZideStoreUI_OGoCalView_H__ + +#include + +@class NSArray, NSCalendarDate; +@class SxAptManager, SxAptSetIdentifier; + +@interface OGoCalView : SoComponent +{ + NSArray *appointments; + id appointment; +} + +/* accessors */ + +- (NSArray *)appointments; +- (id)appointment; + +/* URLs */ + +- (NSString *)appointmentViewURL; +- (NSString *)ownMethodName; +- (NSString *)dateNavigationURLWithNewStartDate:(NSCalendarDate *)_newDate; + +/* backend */ + +- (SxAptManager *)aptManager; +- (SxAptSetIdentifier *)aptSetID; + +/* fetching */ + +- (NSCalendarDate *)startDate; +- (NSCalendarDate *)endDate; +- (NSArray *)fetchGIDs; +- (NSArray *)fetchCoreInfos; + +/* date selection */ +- (NSString *)dateStringForDate:(NSCalendarDate *)_date; +- (NSCalendarDate *)dateForDateString:(NSString *)_dateString; + +@end + +#endif /* __ZideStoreUI_OGoCalView_H__ */ diff --git a/ZideStore/UI-X/Scheduler/OGoCalView.m b/ZideStore/UI-X/Scheduler/OGoCalView.m new file mode 100644 index 00000000..2888ec50 --- /dev/null +++ b/ZideStore/UI-X/Scheduler/OGoCalView.m @@ -0,0 +1,156 @@ +// $Id: OGoCalView.m,v 1.3 2004/06/03 21:56:44 helge Exp $ + +#include "OGoCalView.h" +#include "common.h" +#include + +@interface NSObject(UsedPrivates) +- (SxAptManager *)aptManagerInContext:(id)_ctx; +@end + +@implementation OGoCalView + +- (void)dealloc { + [self->appointment release]; + [self->appointments release]; + [super dealloc]; +} + +/* accessors */ + +- (void)setAppointments:(NSArray *)_apts { + ASSIGN(self->appointments, _apts); +} +- (NSArray *)appointments { + return self->appointments; +} + +- (void)setAppointment:(id)_apt { + ASSIGN(self->appointment, _apt); +} +- (id)appointment { + return self->appointment; +} + +/* URLs */ + +- (NSString *)appointmentViewURL { + id pkey; + + if ((pkey = [[self appointment] valueForKey:@"dateId"]) == nil) + return nil; + + return [NSString stringWithFormat:@"%@/view", pkey]; +} + +- (NSString *)ownMethodName { + NSString *uri; + NSRange r; + + uri = [[[self context] request] uri]; + + /* first: cut off query parameters */ + + r = [uri rangeOfString:@"?" options:NSBackwardsSearch]; + if (r.length > 0) + uri = [uri substringToIndex:r.location]; + + /* next: strip trailing slash */ + + if ([uri hasSuffix:@"/"]) uri = [uri substringToIndex:([uri length] - 1)]; + r = [uri rangeOfString:@"/" options:NSBackwardsSearch]; + + /* then: cut of last path component */ + + if (r.length == 0) // no slash? are we at root? + return @"/"; + + return [uri substringFromIndex:(r.location + 1)]; +} + +- (NSString *)dateNavigationURLWithNewStartDate:(NSCalendarDate *)_newDate { + return [NSString stringWithFormat:@"%@?startDate=%@", + [self ownMethodName], + [self dateStringForDate:_newDate]]; +} + +/* backend */ + +- (SxAptManager *)aptManager { + return [[self clientObject] aptManagerInContext:[self context]]; +} +- (SxAptSetIdentifier *)aptSetID { + return [[self clientObject] aptSetID]; +} + +/* resource URLs (TODO?) */ + +- (NSString *)resourcePath { + return @"/ZideStore.woa/WebServerResources/"; +} + +- (NSString *)favIconPath { + return [[self resourcePath] stringByAppendingPathComponent:@"favicon.ico"]; +} +- (NSString *)cssPath { + NSString *path; + + // TODO: there should be reusable functionality for that! + path = @"ControlPanel/Products/ZideStoreUI/Resources/zidestoreui.css"; + return [[self context] urlWithRequestHandlerKey:@"so" + path:path + queryString:nil]; +} + +- (NSString *)calCSSPath { + NSString *path; + + // TODO: there should be reusable functionality for that! + path = @"ControlPanel/Products/ZideStoreUI/Resources/calendar.css"; + return [[self context] urlWithRequestHandlerKey:@"so" + path:path + queryString:nil]; +} + +/* fetching */ + +- (NSCalendarDate *)startDate { + return [NSCalendarDate date]; +} +- (NSCalendarDate *)endDate { + return [[NSCalendarDate date] tomorrow]; +} + +- (NSArray *)fetchGIDs { + return [[self aptManager] gidsOfAppointmentSet:[self aptSetID] + from:[self startDate] to:[self endDate]]; +} + +- (NSArray *)fetchCoreInfos { + NSArray *gids; + + if (self->appointments) + return self->appointments; + + [self logWithFormat:@"fetching (%@ => %@) ...", + [self startDate], [self endDate]]; + gids = [self fetchGIDs]; + [self logWithFormat:@" %i GIDs ...", [gids count]]; + + self->appointments = + [[[self aptManager] coreInfoOfAppointmentsWithGIDs:gids + inSet:[self aptSetID]] retain]; + + [self logWithFormat:@"fetched %i records.", [self->appointments count]]; + return self->appointments; +} + +- (NSString *)dateStringForDate:(NSCalendarDate *)_date { + return [_date descriptionWithCalendarFormat:@"%Y%m%d"]; +} + +- (NSCalendarDate *)dateForDateString:(NSString *)_dateString { + return [NSCalendarDate dateWithString:_dateString calendarFormat:@"%Y%m%d"]; +} + +@end /* OGoCalView */ diff --git a/ZideStore/UI-X/Scheduler/OGoCalWeekOverview.m b/ZideStore/UI-X/Scheduler/OGoCalWeekOverview.m new file mode 100644 index 00000000..f254f136 --- /dev/null +++ b/ZideStore/UI-X/Scheduler/OGoCalWeekOverview.m @@ -0,0 +1,40 @@ +/* + Copyright (C) 2000-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: OGoCalWeekOverview.m,v 1.3 2004/06/03 21:56:44 helge Exp $ + +#include "OGoCalWeekView.h" + +@interface OGoCalWeekOverview : OGoCalWeekView +{ +} + +@end + +#include "common.h" +#include + +@implementation OGoCalWeekOverview + +- (NSArray *)appointments { + return [self fetchCoreInfos]; +} + +@end /* OGoCalWeekOverview */ diff --git a/ZideStore/UI-X/Scheduler/OGoCalWeekOverview.wox b/ZideStore/UI-X/Scheduler/OGoCalWeekOverview.wox new file mode 100644 index 00000000..c07e87f7 --- /dev/null +++ b/ZideStore/UI-X/Scheduler/OGoCalWeekOverview.wox @@ -0,0 +1,51 @@ + + + month +
+ OGo ZideStore Server - +
+ Client: +
+ Appointments: # +
+ +
+ + + + + + +
other stuff + + + +
previous weekthisweeknext week
+
+ + + + + + +
+ + Appointments: + + + + diff --git a/ZideStore/UI-X/Scheduler/OGoCalWeekView.h b/ZideStore/UI-X/Scheduler/OGoCalWeekView.h new file mode 100644 index 00000000..48005098 --- /dev/null +++ b/ZideStore/UI-X/Scheduler/OGoCalWeekView.h @@ -0,0 +1,19 @@ +// $Id: OGoCalWeekView.h,v 1.2 2004/06/03 21:56:44 helge Exp $ + +#ifndef __ZideStoreUI_OGoCalWeekView_H__ +#define __ZideStoreUI_OGoCalWeekView_H__ + +#include "OGoCalView.h" + +@interface OGoCalWeekView : OGoCalView +{ +} + +/* URLs */ + +- (NSString *)prevWeekURL; +- (NSString *)nextWeekURL; + +@end + +#endif /* __ZideStoreUI_OGoCalWeekView_H__ */ diff --git a/ZideStore/UI-X/Scheduler/OGoCalWeekView.m b/ZideStore/UI-X/Scheduler/OGoCalWeekView.m new file mode 100644 index 00000000..310ec860 --- /dev/null +++ b/ZideStore/UI-X/Scheduler/OGoCalWeekView.m @@ -0,0 +1,50 @@ +// $Id: OGoCalWeekView.m,v 1.3 2004/06/03 21:56:44 helge Exp $ + +#include "OGoCalWeekView.h" +#include "common.h" + +@implementation OGoCalWeekView + +- (NSCalendarDate *)startDate { + NSCalendarDate *startDate; + NSString *dateString; + + dateString = [[[self context] request] formValueForKey:@"startDate"]; + startDate = dateString + ? [self dateForDateString:dateString] + : [[NSCalendarDate date] mondayOfWeek]; + + return startDate; +} + +- (NSCalendarDate *)endDate { + return [[self startDate] dateByAddingYears:0 months:0 days:7 + hours:0 minutes:0 seconds:0]; +} + +/* URLs */ + +- (NSString *)prevWeekURL { + NSCalendarDate *newWeekDate; + + newWeekDate = [[self startDate] dateByAddingYears:0 months:0 days:-7 + hours:0 minutes:0 seconds:0]; + return [self dateNavigationURLWithNewStartDate:newWeekDate]; +} + +- (NSString *)nextWeekURL { + NSCalendarDate *newWeekDate; + + newWeekDate = [[self startDate] dateByAddingYears:0 months:0 days:7 + hours:0 minutes:0 seconds:0]; + return [self dateNavigationURLWithNewStartDate:newWeekDate]; +} + +- (NSString *)thisWeekURL { + NSCalendarDate *newWeekDate; + + newWeekDate = [[NSCalendarDate date] mondayOfWeek]; + return [self dateNavigationURLWithNewStartDate:newWeekDate]; +} + +@end /* OGoCalWeekView */ diff --git a/ZideStore/UI-X/Scheduler/SchedulerUIProduct.m b/ZideStore/UI-X/Scheduler/SchedulerUIProduct.m new file mode 100644 index 00000000..7666ef0a --- /dev/null +++ b/ZideStore/UI-X/Scheduler/SchedulerUIProduct.m @@ -0,0 +1,34 @@ +/* + Copyright (C) 2000-2003 SKYRIX Software AG + + This file is part of OGo + + 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: SchedulerUIProduct.m,v 1.1 2003/11/24 01:24:40 helge Exp $ + +#import + +@interface SchedulerUIProduct : NSObject +{ +} + +@end + +#include "common.h" + +@implementation SchedulerUIProduct +@end /* SchedulerUIProduct */ diff --git a/ZideStore/UI-X/Scheduler/Version b/ZideStore/UI-X/Scheduler/Version new file mode 100644 index 00000000..d64ce5ad --- /dev/null +++ b/ZideStore/UI-X/Scheduler/Version @@ -0,0 +1,5 @@ +# $Id: Version,v 1.1 2003/11/24 01:24:40 helge Exp $ + +SUBMINOR_VERSION:=1 + +# 1.1.0 requires NGObjWeb 4.2.202 diff --git a/ZideStore/UI-X/Scheduler/bundle-info.plist b/ZideStore/UI-X/Scheduler/bundle-info.plist new file mode 100644 index 00000000..44a5c522 --- /dev/null +++ b/ZideStore/UI-X/Scheduler/bundle-info.plist @@ -0,0 +1,20 @@ +{ + "__cvs__" = "$Id: bundle-info.plist,v 1.1 2003/11/24 01:24:40 helge Exp $"; + + requires = { + bundleManagerVersion = 1; + classes = ( + { name = NSObject; } + ); + }; + + provides = { + ZideStoreProducts = ( { name = SchedulerUIProduct; } ); + + classes = ( + ); + + WOComponents = ( + ); + }; +} diff --git a/ZideStore/UI-X/Scheduler/common.h b/ZideStore/UI-X/Scheduler/common.h new file mode 100644 index 00000000..d179d308 --- /dev/null +++ b/ZideStore/UI-X/Scheduler/common.h @@ -0,0 +1,35 @@ +/* + Copyright (C) 2000-2003 SKYRIX Software AG + + This file is part of OGo + + 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: common.h,v 1.1 2003/11/24 01:24:40 helge Exp $ + +#import + +#if LIB_FOUNDATION_LIBRARY +# import +#elif NeXT_Foundation_LIBRARY || COCOA_Foundation_LIBRARY +# import +# import +# import +#endif + +#include +#include +#include diff --git a/ZideStore/UI-X/Scheduler/images/next_week.gif b/ZideStore/UI-X/Scheduler/images/next_week.gif new file mode 100644 index 0000000000000000000000000000000000000000..bacfdb056917cd62f4a98a8971051c1460d4b795 GIT binary patch literal 121 zcmZ?wbhEHb6l4%&SoELa|Ns974jky|=`l7oW?*0dvVkNJDE?$&WME)r&;fBkY8{yE zBzD~~WSnBzsk)`(;O_siQ+jWzO)aQFY%DZMwSNeE