diff --git a/ChangeLog b/ChangeLog index e165269a8..392cd69ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * SoObjects/Contacts/SOGoContactGCSList.m (copyToFolder): Implementation to support copying lists. + * UI/Scheduler/UIxCalDayTable.m: Added support for TimeFormat default. 2009-08-24 Cyril Robert diff --git a/UI/Scheduler/UIxCalDayTable.h b/UI/Scheduler/UIxCalDayTable.h index 47627fcd4..e60d7a495 100644 --- a/UI/Scheduler/UIxCalDayTable.h +++ b/UI/Scheduler/UIxCalDayTable.h @@ -43,6 +43,8 @@ NSMutableArray *hoursToDisplay; NSArray *weekDays; SOGoDateFormatter *dateFormatter; + NSUserDefaults *ud; + NSMutableString *timeFormat; } - (void) setNumberOfDays: (NSNumber *) aNumber; diff --git a/UI/Scheduler/UIxCalDayTable.m b/UI/Scheduler/UIxCalDayTable.m index b1ff678d0..6c4690a29 100644 --- a/UI/Scheduler/UIxCalDayTable.m +++ b/UI/Scheduler/UIxCalDayTable.m @@ -119,6 +119,12 @@ - (NSArray *) hoursToDisplay { unsigned int currentHour, lastHour; + + // For later + ud = [[context activeUser] userDefaults]; + timeFormat = [NSMutableString stringWithString: [ud stringForKey: @"TimeFormat"]]; + if (!timeFormat || [timeFormat length] == 0) + timeFormat = [NSMutableString stringWithString: @"%H:00"]; if (!hoursToDisplay) { @@ -178,7 +184,19 @@ - (NSString *) currentTableHour { - return currentTableHour; + int hour; + NSCalendarDate *tmp; + NSString *formatted = currentTableHour, *parse; + + hour = [currentTableHour intValue]; + parse = [NSString stringWithFormat: @"2000-01-01 %02d:00", hour]; + + tmp = [NSCalendarDate dateWithString: parse + calendarFormat: @"%Y-%m-%d %H:%M"]; + if (tmp) + formatted = [tmp descriptionWithCalendarFormat: timeFormat]; + + return formatted; } - (NSString *) currentAppointmentHour diff --git a/UI/Templates/SchedulerUI/UIxCalDayTable.wox b/UI/Templates/SchedulerUI/UIxCalDayTable.wox index d2890b92f..aa77dbb57 100644 --- a/UI/Templates/SchedulerUI/UIxCalDayTable.wox +++ b/UI/Templates/SchedulerUI/UIxCalDayTable.wox @@ -28,7 +28,7 @@
:00
diff --git a/UI/WebServerResources/UIxMailEditor.js b/UI/WebServerResources/UIxMailEditor.js index 312bec2aa..ca924cf07 100644 --- a/UI/WebServerResources/UIxMailEditor.js +++ b/UI/WebServerResources/UIxMailEditor.js @@ -533,7 +533,7 @@ function initTabIndex(addressList, subjectField, msgArea) { } function initMailEditor() { - if (composeMode != "html") + if (composeMode != "html" && $("text")) $("text").style.display = "block"; var list = $("attachments");