parent
462b9ad99f
commit
3388c18466
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2006-2020 Inverse inc.
|
||||
Copyright (C) 2006-2021 Inverse inc.
|
||||
Copyright (C) 2000-2005 SKYRIX Software AG
|
||||
|
||||
This file is part of SOGo.
|
||||
|
@ -106,7 +106,8 @@
|
|||
if (!oldStartDate)
|
||||
{
|
||||
ASSIGN (oldStartDate, [[self previousApt] startDate]);
|
||||
if (![(iCalEvent*)[self previousApt] isAllDay])
|
||||
if ([[self previousApt] isKindOfClass: [iCalToDo class]] ||
|
||||
![(iCalEvent*)[self previousApt] isAllDay])
|
||||
[oldStartDate setTimeZone: viewTZ];
|
||||
}
|
||||
return oldStartDate;
|
||||
|
@ -117,7 +118,8 @@
|
|||
if (!newStartDate)
|
||||
{
|
||||
ASSIGN (newStartDate, [[self apt] startDate]);
|
||||
if (![(iCalEvent*)[self apt] isAllDay])
|
||||
if ([[self apt] isKindOfClass: [iCalToDo class]] ||
|
||||
![(iCalEvent*)[self apt] isAllDay])
|
||||
[newStartDate setTimeZone: viewTZ];
|
||||
}
|
||||
return newStartDate;
|
||||
|
@ -134,12 +136,15 @@
|
|||
endDate = [(iCalEvent*)[self previousApt] endDate];
|
||||
if ([(iCalEvent*)[self previousApt] isAllDay])
|
||||
endDate = [endDate dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:-1];
|
||||
else
|
||||
[endDate setTimeZone: viewTZ];
|
||||
ASSIGN (oldEndDate, endDate);
|
||||
}
|
||||
else
|
||||
ASSIGN (oldEndDate, [(iCalToDo*)[self previousApt] due]);
|
||||
if (![(iCalEvent*)[self previousApt] isAllDay])
|
||||
[oldEndDate setTimeZone: viewTZ];
|
||||
{
|
||||
ASSIGN (oldEndDate, [(iCalToDo*)[self previousApt] due]);
|
||||
[oldEndDate setTimeZone: viewTZ];
|
||||
}
|
||||
}
|
||||
return oldEndDate;
|
||||
}
|
||||
|
@ -155,12 +160,15 @@
|
|||
endDate = [(iCalEvent*)[self apt] endDate];
|
||||
if ([(iCalEvent*)[self apt] isAllDay])
|
||||
endDate = [endDate dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:-1];
|
||||
else
|
||||
[endDate setTimeZone: viewTZ];
|
||||
ASSIGN (newEndDate, endDate);
|
||||
}
|
||||
else
|
||||
ASSIGN (newEndDate, [(iCalToDo*)[self apt] due]);
|
||||
if (![(iCalEvent*)[self apt] isAllDay])
|
||||
[newEndDate setTimeZone: viewTZ];
|
||||
{
|
||||
ASSIGN (newEndDate, [(iCalToDo*)[self apt] due]);
|
||||
[newEndDate setTimeZone: viewTZ];
|
||||
}
|
||||
}
|
||||
return newEndDate;
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
- (NSString *) aptSummary;
|
||||
- (NSString *) aptStartDate;
|
||||
- (NSString *) aptEndDate;
|
||||
- (NSString *) calendarName;
|
||||
- (iCalPerson *) organizer;
|
||||
|
||||
|
|
|
@ -56,10 +56,17 @@ static NSCharacterSet *wsSet = nil;
|
|||
|
||||
- (void) setupValues
|
||||
{
|
||||
NSString *formattedDate;
|
||||
|
||||
[super setupValues];
|
||||
|
||||
[values setObject: [self aptStartDate]
|
||||
forKey: @"StartDate"];
|
||||
formattedDate = [self aptStartDate];
|
||||
if (![formattedDate length])
|
||||
// Task with a due date
|
||||
formattedDate = [self aptEndDate];
|
||||
if ([formattedDate length])
|
||||
[values setObject: formattedDate
|
||||
forKey: @"StartDate"];
|
||||
}
|
||||
|
||||
- (NSString *) getBody
|
||||
|
@ -112,7 +119,7 @@ static NSCharacterSet *wsSet = nil;
|
|||
[self setupValues];
|
||||
|
||||
s = [self labelForKey: @"Reminder: \"%{Summary}\" - %{StartDate}"
|
||||
inContext: context];
|
||||
inContext: context];
|
||||
|
||||
return [values keysWithFormat: s];
|
||||
}
|
||||
|
|
|
@ -158,7 +158,6 @@
|
|||
WOContext *localContext;
|
||||
WOApplication *app;
|
||||
SOGoAptMailReminder *p;
|
||||
NSString *pageName;
|
||||
WOResourceManager *rm;
|
||||
|
||||
SOGoAppointmentFolders *folders;
|
||||
|
@ -188,9 +187,7 @@
|
|||
folders = [userFolder privateCalendars: @"Calendar"
|
||||
inContext: localContext];
|
||||
|
||||
pageName = [NSString stringWithFormat: @"SOGoAptMail%@", @"Reminder"];
|
||||
|
||||
p = [app pageWithName: pageName inContext: localContext];
|
||||
p = [app pageWithName: @"SOGoAptMailReminder" inContext: localContext];
|
||||
|
||||
parts = [containerPath componentsSeparatedByString: @"/"];
|
||||
if ([parts count] > 4)
|
||||
|
|
|
@ -29,10 +29,11 @@ th, td { font-family: Lucida Grande, Bitstream VeraSans, Tahoma, sans-serif; fon
|
|||
<th align="right" style="font-weight: bold;"><var:string label:value="location_label" const:escapeHTML="NO"/></th>
|
||||
<td><var:string value="apt.location" const:escapeHTML="NO"/></td>
|
||||
</tr></var:if>
|
||||
<tr>
|
||||
<var:if condition="aptStartDate.length"
|
||||
><tr>
|
||||
<th align="right" style="font-weight: bold;"><var:string label:value="startDate_label" const:escapeHTML="NO"/></th>
|
||||
<td><var:string value="aptStartDate" const:escapeHTML="NO"/></td>
|
||||
</tr>
|
||||
</tr></var:if>
|
||||
<var:if condition="aptEndDate"
|
||||
><tr>
|
||||
<th align="right" style="font-weight: bold;"><var:string label:value="endDate_label" const:escapeHTML="NO"/></th>
|
||||
|
|
Loading…
Reference in New Issue