From 59c1a34a4573946ad7fc9ee9789199d658dce659 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 31 Oct 2006 22:58:26 +0000 Subject: [PATCH] Monotone-Parent: 520d3359a27192e2a9761e453f816cdd755a1509 Monotone-Revision: 93761fa4ba935f3bb44092a15d1a6d416b73af2a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-10-31T22:58:26 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ UI/Scheduler/UIxCalDayTable.m | 22 +++++++++++++++++++++ UI/Templates/SchedulerUI/UIxCalDayTable.wox | 6 ++---- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b4af5aa39..617c3cf9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2006-10-31 Wolfgang Sourdeau + * UI/Scheduler/UIxCalDayTable.m ([UIxCalDayTable + -dayCellClasses]): new method that returns a string containing the + css classes applicable to the current cell, depending on the + position of the day in the week, the day of today and the + requested day. + * UI/Scheduler/UIxCalCalendarsListView.m ([UIxCalCalendarsListView -currentContactAptBorder]): new method that returns the appropriate border color for the specified user. diff --git a/UI/Scheduler/UIxCalDayTable.m b/UI/Scheduler/UIxCalDayTable.m index 750db8e6e..4d0ebbc8a 100644 --- a/UI/Scheduler/UIxCalDayTable.m +++ b/UI/Scheduler/UIxCalDayTable.m @@ -161,6 +161,28 @@ return currentTableDay; } +- (NSString *) dayCellClasses +{ + NSMutableString *classes; + int dayOfWeek; + + classes = [NSMutableString new]; + [classes autorelease]; + [classes appendString: @"contentOfDay"]; + if (numberOfDays > 1) + { + dayOfWeek = [currentTableDay dayOfWeek]; + if (dayOfWeek == 0 || dayOfWeek == 6) + [classes appendString: @" weekEndDay"]; + if ([currentTableDay isToday]) + [classes appendString: @" dayOfToday"]; + if ([[self selectedDate] isDateOnSameDay: currentTableDay]) + [classes appendString: @" selectedDay"]; + } + + return classes; +} + - (NSString *) currentAppointmentDay { return [NSString stringWithFormat: @"%d%.2d%.2d", diff --git a/UI/Templates/SchedulerUI/UIxCalDayTable.wox b/UI/Templates/SchedulerUI/UIxCalDayTable.wox index 95bcef871..d3504a157 100644 --- a/UI/Templates/SchedulerUI/UIxCalDayTable.wox +++ b/UI/Templates/SchedulerUI/UIxCalDayTable.wox @@ -41,7 +41,6 @@ referenceDate="selectedDate" canAccess="canAccessApt" /> -
@@ -54,7 +53,7 @@ />:00 -