From 06cb06fce62fdf3af0517be0e220fcf861f938f9 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Mon, 29 Jun 2015 21:03:52 -0400 Subject: [PATCH] New UIxTaskEditorTemplate class --- UI/Scheduler/UIxCalMainView.m | 50 +++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/UI/Scheduler/UIxCalMainView.m b/UI/Scheduler/UIxCalMainView.m index 33894af98..49da84a8b 100644 --- a/UI/Scheduler/UIxCalMainView.m +++ b/UI/Scheduler/UIxCalMainView.m @@ -329,13 +329,23 @@ @end -@interface UIxAppointmentEditorTemplate : UIxComponent +@interface UIxComponentEditorTemplate : UIxComponent { id item; } @end -@implementation UIxAppointmentEditorTemplate +@implementation UIxComponentEditorTemplate + +- (id) init +{ + if ((self = [super init])) + { + item = nil; + } + + return self; +} - (void) dealloc { @@ -377,3 +387,39 @@ } @end + +@interface UIxAppointmentEditorTemplate : UIxComponentEditorTemplate +@end + +@implementation UIxAppointmentEditorTemplate +@end + +@interface UIxTaskEditorTemplate : UIxComponentEditorTemplate +@end + +@implementation UIxTaskEditorTemplate + +- (NSArray *) statusList +{ + static NSArray *statusItems = nil; + + if (!statusItems) + { + statusItems = [NSArray arrayWithObjects: @"not-specified", + @"needs-action", + @"in-process", + @"completed", + @"cancelled", + nil]; + [statusItems retain]; + } + + return statusItems; +} + +- (NSString *) itemStatusText +{ + return [self labelForKey: [NSString stringWithFormat: @"status_%@", [item uppercaseString]]]; +} + +@end