diff --git a/UI/Scheduler/UIxAppointmentEditor.m b/UI/Scheduler/UIxAppointmentEditor.m index 1dc694988..bea74c726 100644 --- a/UI/Scheduler/UIxAppointmentEditor.m +++ b/UI/Scheduler/UIxAppointmentEditor.m @@ -23,6 +23,7 @@ #import #import +#import #import #import #import @@ -56,14 +57,14 @@ @implementation UIxAppointmentEditor -- (id) init +- (id) initWithContext: (WOContext *) _context { SOGoUser *user; - if ((self = [super init])) + if ((self = [super initWithContext: _context])) { - user = [[self context] activeUser]; - ASSIGN (dateFormatter, [user dateFormatterInContext: context]); + user = [_context activeUser]; + ASSIGN (dateFormatter, [user dateFormatterInContext: _context]); } return self; diff --git a/UI/Scheduler/UIxComponentEditor.h b/UI/Scheduler/UIxComponentEditor.h index 73c57f40e..44adb4ccc 100644 --- a/UI/Scheduler/UIxComponentEditor.h +++ b/UI/Scheduler/UIxComponentEditor.h @@ -21,13 +21,13 @@ #ifndef UIXCOMPONENTEDITOR_H #define UIXCOMPONENTEDITOR_H -#import +#import @class NSDictionary; @class iCalRepeatableEntityObject; -@interface UIxComponentEditor : UIxComponent +@interface UIxComponentEditor : SOGoDirectAction { iCalRepeatableEntityObject *component; SOGoAppointmentFolder *componentCalendar; diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index b0f901a3d..f45f35160 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -27,6 +27,7 @@ #import #import #import +#import #import #import #import @@ -125,17 +126,20 @@ static NSArray *reminderValues = nil; [super dealloc]; } -- (void) setClientObject: (id)_client +- (id) initWithContext: (WOContext *) _context { - [super setClientObject: _client]; // WOComponent+SoObjects + if ((self = [super initWithContext: _context])) + { + component = [[self clientObject] occurence]; + [[component parent] retain]; - component = [[self clientObject] occurence]; - [[component parent] retain]; + componentCalendar = [[self clientObject] container]; + if ([componentCalendar isKindOfClass: [SOGoCalendarComponent class]]) + componentCalendar = [componentCalendar container]; + [componentCalendar retain]; + } - componentCalendar = [[self clientObject] container]; - if ([componentCalendar isKindOfClass: [SOGoCalendarComponent class]]) - componentCalendar = [componentCalendar container]; - [componentCalendar retain]; + return self; } - (BOOL) isChildOccurrence diff --git a/UI/Scheduler/UIxTaskEditor.m b/UI/Scheduler/UIxTaskEditor.m index fe06b714c..0cb4d39eb 100644 --- a/UI/Scheduler/UIxTaskEditor.m +++ b/UI/Scheduler/UIxTaskEditor.m @@ -22,6 +22,7 @@ #import #import +#import #import #import #import @@ -49,16 +50,14 @@ @implementation UIxTaskEditor -- (id) init +- (id) initWithContext: (WOContext *) _context { SOGoUser *user; - if ((self = [super init])) + if ((self = [super initWithContext: _context])) { - // item = nil; - - user = [[self context] activeUser]; - ASSIGN (dateFormatter, [user dateFormatterInContext: context]); + user = [_context activeUser]; + ASSIGN (dateFormatter, [user dateFormatterInContext: _context]); } return self; @@ -140,6 +139,8 @@ // } /* actions */ + +/* - (NSCalendarDate *) newStartDate { NSCalendarDate *newStartDate, *now; @@ -177,6 +178,7 @@ return newStartDate; } +*/ // - (id ) defaultAction // { @@ -602,6 +604,7 @@ return [self responseWithStatus: 200 andJSONRepresentation: data]; } +/* - (id) changeStatusAction { NSString *newStatus; @@ -624,5 +627,6 @@ return [self responseWith204]; } +*/ @end diff --git a/UI/Scheduler/product.plist b/UI/Scheduler/product.plist index a9c912557..f03d2ba6f 100644 --- a/UI/Scheduler/product.plist +++ b/UI/Scheduler/product.plist @@ -246,30 +246,22 @@ methods = { view = { protectedBy = "ViewAllComponent"; - pageName = "UIxAppointmentEditor"; + actionClass = "UIxAppointmentEditor"; actionName = "view"; }; - edit = { - protectedBy = "ViewAllComponent"; - pageName = "UIxAppointmentEditor"; - }; - editAsAppointment = { - protectedBy = "ViewAllComponent"; - pageName = "UIxAppointmentEditor"; - }; save = { protectedBy = "ModifyComponent"; - pageName = "UIxAppointmentEditor"; + actionClass = "UIxAppointmentEditor"; actionName = "save"; }; rsvpAppointment = { protectedBy = "RespondToComponent"; - pageName = "UIxAppointmentEditor"; + actionClass = "UIxAppointmentEditor"; actionName = "rsvp"; }; saveAsAppointment = { protectedBy = "ModifyComponent"; - pageName = "UIxAppointmentEditor"; + actionClass = "UIxAppointmentEditor"; actionName = "save"; }; copy = { @@ -305,35 +297,22 @@ methods = { view = { protectedBy = "ViewAllComponent"; - pageName = "UIxTaskEditor"; + actionClass = "UIxTaskEditor"; actionName = "view"; }; - edit = { - protectedBy = "ViewAllComponent"; - pageName = "UIxTaskEditor"; - }; - editAsTask = { - protectedBy = "ViewAllComponent"; - pageName = "UIxTaskEditor"; - }; save = { protectedBy = "ModifyComponent"; - pageName = "UIxTaskEditor"; + actionClass = "UIxTaskEditor"; actionName = "save"; }; saveAsTask = { protectedBy = "ModifyComponent"; - pageName = "UIxTaskEditor"; + actionClass = "UIxTaskEditor"; actionName = "save"; }; - changeStatus = { - protectedBy = "ModifyComponent"; - pageName = "UIxTaskEditor"; - actionName = "changeStatus"; - }; raw = { protectedBy = "ViewAllComponent"; - pageName = "UIxTaskEditor"; + actionClass = "UIxTaskEditor"; actionName = "raw"; }; }; @@ -366,13 +345,9 @@ }; }; methods = { - edit = { - protectedBy = "ViewAllComponent"; - pageName = "UIxAppointmentEditor"; - }; save = { protectedBy = "ModifyComponent"; - pageName = "UIxAppointmentEditor"; + actionClass = "UIxAppointmentEditor"; actionName = "save"; }; delete = { @@ -396,13 +371,9 @@ }; }; methods = { - edit = { - protectedBy = "ViewAllComponent"; - pageName = "UIxTaskEditor"; - }; save = { protectedBy = "ModifyComponent"; - pageName = "UIxTaskEditor"; + actionClass = "UIxTaskEditor"; actionName = "save"; }; delete = { diff --git a/UI/Templates/SchedulerUI/UIxAppointmentEditor.wox b/UI/Templates/SchedulerUI/UIxAppointmentEditor.wox deleted file mode 100644 index fadb4f973..000000000 --- a/UI/Templates/SchedulerUI/UIxAppointmentEditor.wox +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - -
- - - - - - - - -
- - - - - - - - - - - - - - - -
diff --git a/UI/Templates/SchedulerUI/UIxComponentEditor.wox b/UI/Templates/SchedulerUI/UIxComponentEditor.wox deleted file mode 100644 index f8e79b860..000000000 --- a/UI/Templates/SchedulerUI/UIxComponentEditor.wox +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - - - - -
-
- - - - - - - - - - - - - - -
- -
- -
-