Monotone-Parent: 7fbc310dbd531814ded84ae464d6b9f7f793be37
Monotone-Revision: 0a9e1bf24e4625bf9d860542966adcb75d55def5 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-06-19T18:08:16 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
b30b05dd21
commit
6aeca8b0b1
|
@ -33,10 +33,8 @@ SchedulerUI_OBJC_FILES = \
|
|||
UIxAttendeesEditor.m \
|
||||
UIxComponentEditor.m \
|
||||
UIxCalendarSelector.m \
|
||||
UIxAppointmentView.m \
|
||||
UIxAppointmentEditor.m \
|
||||
UIxAppointmentProposal.m \
|
||||
UIxTaskView.m \
|
||||
UIxTaskEditor.m \
|
||||
UIxTaskProposal.m \
|
||||
UIxCalDateLabel.m \
|
||||
|
|
|
@ -33,24 +33,16 @@
|
|||
|
||||
@interface UIxCalDayTable : UIxCalView
|
||||
{
|
||||
SOGoDateFormatter *dateFormatter;
|
||||
int numberOfDays;
|
||||
NSCalendarDate *startDate;
|
||||
NSCalendarDate *currentTableDay;
|
||||
NSString *currentTableHour;
|
||||
NSMutableArray *daysToDisplay;
|
||||
NSMutableArray *hoursToDisplay;
|
||||
|
||||
NSString *cssClass;
|
||||
NSString *cssId;
|
||||
NSArray *weekDays;
|
||||
SOGoDateFormatter *dateFormatter;
|
||||
}
|
||||
|
||||
- (void) setCSSClass: (NSString *) aCssClass;
|
||||
- (NSString *) cssClass;
|
||||
|
||||
- (void) setCSSId: (NSString *) aCssId;
|
||||
- (NSString *) cssId;
|
||||
|
||||
- (void) setNumberOfDays: (NSString *) aNumber;
|
||||
- (NSString *) numberOfDays;
|
||||
|
||||
|
|
|
@ -25,11 +25,13 @@
|
|||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSKeyValueCoding.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import <EOControl/EOQualifier.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
|
||||
#import <NGExtensions/NSCalendarDate+misc.h>
|
||||
#import <SOGoUI/SOGoDateFormatter.h>
|
||||
#import <EOControl/EOQualifier.h>
|
||||
|
||||
#import <SoObjects/SOGo/SOGoDateFormatter.h>
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
|
||||
#import "UIxCalDayTable.h"
|
||||
|
||||
|
@ -41,15 +43,15 @@
|
|||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
// allAppointments = nil;
|
||||
daysToDisplay = nil;
|
||||
hoursToDisplay = nil;
|
||||
numberOfDays = 1;
|
||||
startDate = nil;
|
||||
currentTableDay = nil;
|
||||
currentTableHour = nil;
|
||||
dateFormatter = [[SOGoDateFormatter alloc]
|
||||
initWithLocale: [self locale]];
|
||||
weekDays = [[context valueForKey: @"locale"] objectForKey: NSShortWeekDayNameArray];
|
||||
[weekDays retain];
|
||||
dateFormatter = [[context activeUser] dateFormatterInContext: context];
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -59,32 +61,12 @@
|
|||
{
|
||||
// if (allAppointments)
|
||||
// [allAppointments release];
|
||||
[weekDays release];
|
||||
[daysToDisplay release];
|
||||
[hoursToDisplay release];
|
||||
[dateFormatter release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) setCSSClass: (NSString *) aCssClass
|
||||
{
|
||||
cssClass = aCssClass;
|
||||
}
|
||||
|
||||
- (NSString *) cssClass
|
||||
{
|
||||
return cssClass;
|
||||
}
|
||||
|
||||
- (void) setCSSId: (NSString *) aCssId
|
||||
{
|
||||
cssId = aCssId;
|
||||
}
|
||||
|
||||
- (NSString *) cssId
|
||||
{
|
||||
return cssId;
|
||||
}
|
||||
|
||||
- (void) setNumberOfDays: (NSString *) aNumber
|
||||
{
|
||||
numberOfDays = [aNumber intValue];
|
||||
|
@ -194,12 +176,12 @@
|
|||
|
||||
- (NSString *) labelForDay
|
||||
{
|
||||
return [dateFormatter shortDayOfWeek: [currentTableDay dayOfWeek]];
|
||||
return [weekDays objectAtIndex: [currentTableDay dayOfWeek]];
|
||||
}
|
||||
|
||||
- (NSString *) labelForDate
|
||||
{
|
||||
return [dateFormatter stringForObjectValue: currentTableDay];
|
||||
return [dateFormatter shortFormattedDate: currentTableDay];
|
||||
}
|
||||
|
||||
// - (NSDictionary *) _adjustedAppointment: (NSDictionary *) anAppointment
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
NSString *userLogin;
|
||||
WORequest *request;
|
||||
SOGoDateFormatter *dateFormatter;
|
||||
NSTimeZone *userTimeZone;
|
||||
}
|
||||
|
||||
- (WOResponse *) eventsListAction;
|
||||
|
|
|
@ -33,12 +33,12 @@
|
|||
#import <NGExtensions/NSCalendarDate+misc.h>
|
||||
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
#import <SoObjects/SOGo/SOGoDateFormatter.h>
|
||||
#import <SoObjects/SOGo/NSCalendarDate+SOGo.h>
|
||||
#import <SoObjects/SOGo/NSArray+Utilities.h>
|
||||
#import <SoObjects/SOGo/NSObject+Utilities.h>
|
||||
#import <SoObjects/Appointments/SOGoAppointmentFolder.h>
|
||||
|
||||
#import "../SOGoUI/SOGoDateFormatter.h"
|
||||
#import "NSArray+Scheduler.h"
|
||||
|
||||
#import "UIxCalListingActions.h"
|
||||
|
@ -47,7 +47,7 @@
|
|||
|
||||
- (id) initWithRequest: (WORequest *) newRequest
|
||||
{
|
||||
NSDictionary *locale;
|
||||
SOGoUser *user;
|
||||
|
||||
if ((self = [super initWithRequest: newRequest]))
|
||||
{
|
||||
|
@ -55,9 +55,9 @@
|
|||
startDate = nil;
|
||||
endDate = nil;
|
||||
ASSIGN (request, newRequest);
|
||||
locale = [[self context] valueForKey: @"locale"];
|
||||
dateFormatter = [[SOGoDateFormatter alloc] initWithLocale: locale];
|
||||
[dateFormatter setFullWeekdayNameAndDetails];
|
||||
user = [[self context] activeUser];
|
||||
dateFormatter = [user dateFormatterInContext: context];
|
||||
ASSIGN (userTimeZone, [user timeZone]);
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -70,6 +70,7 @@
|
|||
[componentsData release];
|
||||
[startDate release];
|
||||
[endDate release];
|
||||
[userTimeZone release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -297,13 +298,29 @@
|
|||
return response;
|
||||
}
|
||||
|
||||
- (NSString *) _formattedDateForSeconds: (unsigned int) seconds
|
||||
forAllDay: (BOOL) forAllDay
|
||||
{
|
||||
NSCalendarDate *date;
|
||||
NSString *formattedDate;
|
||||
|
||||
date = [NSCalendarDate dateWithTimeIntervalSince1970: seconds];
|
||||
[date setTimeZone: userTimeZone];
|
||||
if (forAllDay)
|
||||
formattedDate = [dateFormatter formattedDate: date];
|
||||
else
|
||||
formattedDate = [dateFormatter formattedDateAndTime: date];
|
||||
|
||||
return formattedDate;
|
||||
}
|
||||
|
||||
- (WOResponse *) eventsListAction
|
||||
{
|
||||
NSArray *fields, *oldEvent;
|
||||
NSEnumerator *events;
|
||||
NSString *date;
|
||||
NSMutableArray *newEvents, *newEvent;
|
||||
unsigned int interval;
|
||||
BOOL isAllDay;
|
||||
|
||||
[self _setupContext];
|
||||
|
||||
|
@ -317,12 +334,13 @@
|
|||
while (oldEvent)
|
||||
{
|
||||
newEvent = [NSMutableArray arrayWithArray: oldEvent];
|
||||
isAllDay = [[oldEvent objectAtIndex: 7] boolValue];
|
||||
interval = [[oldEvent objectAtIndex: 4] intValue];
|
||||
date = [dateFormatter stringForSecondsSinceThe70s: interval];
|
||||
[newEvent addObject: date];
|
||||
[newEvent addObject: [self _formattedDateForSeconds: interval
|
||||
forAllDay: isAllDay]];
|
||||
interval = [[oldEvent objectAtIndex: 5] intValue];
|
||||
date = [dateFormatter stringForSecondsSinceThe70s: interval];
|
||||
[newEvent addObject: date];
|
||||
[newEvent addObject: [self _formattedDateForSeconds: interval
|
||||
forAllDay: isAllDay]];
|
||||
[newEvents addObject: newEvent];
|
||||
|
||||
oldEvent = [events nextObject];
|
||||
|
|
|
@ -130,15 +130,6 @@
|
|||
};
|
||||
};
|
||||
methods = {
|
||||
view = {
|
||||
protectedBy = "ViewAllComponent";
|
||||
pageName = "UIxAppointmentView";
|
||||
};
|
||||
delete = {
|
||||
protectedBy = "Delete Objects";
|
||||
pageName = "UIxAppointmentView";
|
||||
actionName = "delete";
|
||||
};
|
||||
edit = {
|
||||
protectedBy = "ViewAllComponent";
|
||||
pageName = "UIxAppointmentEditor";
|
||||
|
@ -178,15 +169,11 @@
|
|||
};
|
||||
};
|
||||
methods = {
|
||||
view = {
|
||||
protectedBy = "ViewAllComponent";
|
||||
pageName = "UIxTaskView";
|
||||
};
|
||||
delete = {
|
||||
protectedBy = "Delete Objects";
|
||||
pageName = "UIxTaskView";
|
||||
actionName = "delete";
|
||||
};
|
||||
// delete = {
|
||||
// protectedBy = "Delete Objects";
|
||||
// pageName = "UIxTaskView";
|
||||
// actionName = "delete";
|
||||
// };
|
||||
edit = {
|
||||
protectedBy = "ViewAllComponent";
|
||||
pageName = "UIxTaskEditor";
|
||||
|
|
Loading…
Reference in New Issue