From be459fa946a3153e2d187e5b623ceda2d35e3f31 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Mon, 21 Jan 2013 12:12:50 -0500 Subject: [PATCH] Fix first day of the week in datepickers Fixes #2188 --- UI/Scheduler/UIxComponentEditor.h | 1 + UI/Scheduler/UIxComponentEditor.m | 9 +++++++++ UI/Templates/SchedulerUI/UIxComponentEditor.wox | 1 + UI/WebServerResources/UIxAppointmentEditor.js | 4 ++-- UI/WebServerResources/UIxAttendeesEditor.js | 6 ++++-- UI/WebServerResources/UIxPreferences.js | 3 ++- UI/WebServerResources/UIxRecurrenceEditor.js | 3 ++- UI/WebServerResources/UIxTaskEditor.js | 6 +++--- UI/WebServerResources/generic.js | 13 +++++++++++++ 9 files changed, 37 insertions(+), 9 deletions(-) diff --git a/UI/Scheduler/UIxComponentEditor.h b/UI/Scheduler/UIxComponentEditor.h index 2a9f64910..4e292b8ea 100644 --- a/UI/Scheduler/UIxComponentEditor.h +++ b/UI/Scheduler/UIxComponentEditor.h @@ -178,6 +178,7 @@ /* access */ - (BOOL) isMyComponent; - (BOOL) canEditComponent; +- (unsigned int) firstDayOfWeek; /* helpers */ - (NSString *) completeURIForMethod: (NSString *) _method; diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index beacfa1db..ced89c05e 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -2532,6 +2532,15 @@ RANGE(2); return [[self clientObject] ownerInContext: context]; } +- (unsigned int) firstDayOfWeek +{ + SOGoUserDefaults *ud; + + ud = [[context activeUser] userDefaults]; + + return [ud firstDayOfWeek]; +} + // returns the raw content of the object - (WOResponse *) rawAction { diff --git a/UI/Templates/SchedulerUI/UIxComponentEditor.wox b/UI/Templates/SchedulerUI/UIxComponentEditor.wox index 499fe986a..586f86150 100644 --- a/UI/Templates/SchedulerUI/UIxComponentEditor.wox +++ b/UI/Templates/SchedulerUI/UIxComponentEditor.wox @@ -22,6 +22,7 @@ var attendees = ; var ownerLogin = ''; var emailAlarmsEnabled = ; + var firstDayOfWeek = ; var organizer = ;var owners = ;