Mantis 1911: Added support for shor time format in calendar view
Monotone-Parent: 3cb43f8e60e5dd474976b8e32f28cbb097744a16 Monotone-Revision: 9a9029239df8b59ccf4609e50402e80e31085154 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-08-25T15:05:01 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
9881f32a82
commit
b7c9a59791
|
@ -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 <crobert@inverse.ca>
|
||||
|
||||
|
|
|
@ -43,6 +43,8 @@
|
|||
NSMutableArray *hoursToDisplay;
|
||||
NSArray *weekDays;
|
||||
SOGoDateFormatter *dateFormatter;
|
||||
NSUserDefaults *ud;
|
||||
NSMutableString *timeFormat;
|
||||
}
|
||||
|
||||
- (void) setNumberOfDays: (NSNumber *) aNumber;
|
||||
|
|
|
@ -120,6 +120,12 @@
|
|||
{
|
||||
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)
|
||||
{
|
||||
hoursToDisplay = [NSMutableArray new];
|
||||
|
@ -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
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<div id="daysView" var:class="daysViewClasses">
|
||||
<div class="hours">
|
||||
<var:foreach list="hoursToDisplay" item="currentTableHour"
|
||||
><div class="hour"><var:string value="currentTableHour" />:00</div
|
||||
><div class="hour"><var:string value="currentTableHour" /></div
|
||||
></var:foreach>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue