Monotone-Parent: e44e3640213c46f7a069d1612037b80c15c40ea7
Monotone-Revision: 96d751786922d33162cb95008bfb6f6460b05db4 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-03-21T00:37:22 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
66e53da063
commit
071bdd863f
|
@ -1,3 +1,9 @@
|
|||
2011-03-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/Scheduler/UIxComponentEditor.m
|
||||
(-takeValuesFromRequest:inContext:): added some sanity checks to
|
||||
avoid crashes when alarm data is not properly entered.
|
||||
|
||||
2011-03-18 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/SchedulerUI.js (initCalendars): we must
|
||||
|
|
|
@ -2150,38 +2150,48 @@ RANGE(2);
|
|||
}
|
||||
else {
|
||||
// Custom alarm
|
||||
[anAlarm setAction: [reminderAction uppercaseString]];
|
||||
if ([reminderAction isEqualToString: @"email"])
|
||||
if ([reminderAction length] > 0 && [reminderUnit length] > 0)
|
||||
{
|
||||
[anAlarm removeAllAttendees];
|
||||
if (reminderEmailAttendees)
|
||||
[self _appendAttendees: [component attendees]
|
||||
[anAlarm setAction: [reminderAction uppercaseString]];
|
||||
if ([reminderAction isEqualToString: @"email"])
|
||||
{
|
||||
[anAlarm removeAllAttendees];
|
||||
if (reminderEmailAttendees)
|
||||
[self _appendAttendees: [component attendees]
|
||||
toEmailAlarm: anAlarm];
|
||||
if (reminderEmailOrganizer)
|
||||
[self _appendOrganizerToEmailAlarm: anAlarm];
|
||||
[anAlarm setSummary: [component summary]];
|
||||
[anAlarm setComment: [component comment]];
|
||||
if (reminderEmailOrganizer)
|
||||
[self _appendOrganizerToEmailAlarm: anAlarm];
|
||||
[anAlarm setSummary: [component summary]];
|
||||
[anAlarm setComment: [component comment]];
|
||||
}
|
||||
|
||||
if ([reminderReference caseInsensitiveCompare: @"BEFORE"] == NSOrderedSame)
|
||||
aValue = [NSString stringWithString: @"-P"];
|
||||
else
|
||||
aValue = [NSString stringWithString: @"P"];
|
||||
|
||||
if ([reminderUnit caseInsensitiveCompare: @"MINUTES"] == NSOrderedSame ||
|
||||
[reminderUnit caseInsensitiveCompare: @"HOURS"] == NSOrderedSame)
|
||||
aValue = [aValue stringByAppendingString: @"T"];
|
||||
|
||||
aValue = [aValue stringByAppendingFormat: @"%i%@",
|
||||
[reminderQuantity intValue],
|
||||
[reminderUnit substringToIndex: 1]];
|
||||
[aTrigger setValue: aValue];
|
||||
[aTrigger setRelationType: reminderRelation];
|
||||
}
|
||||
else
|
||||
{
|
||||
[anAlarm release];
|
||||
anAlarm = nil;
|
||||
}
|
||||
|
||||
if ([reminderReference caseInsensitiveCompare: @"BEFORE"] == NSOrderedSame)
|
||||
aValue = [NSString stringWithString: @"-P"];
|
||||
else
|
||||
aValue = [NSString stringWithString: @"P"];
|
||||
|
||||
if ([reminderUnit caseInsensitiveCompare: @"MINUTES"] == NSOrderedSame ||
|
||||
[reminderUnit caseInsensitiveCompare: @"HOURS"] == NSOrderedSame)
|
||||
aValue = [aValue stringByAppendingString: @"T"];
|
||||
|
||||
aValue = [aValue stringByAppendingFormat: @"%i%@",
|
||||
[reminderQuantity intValue],
|
||||
[reminderUnit substringToIndex: 1]];
|
||||
[aTrigger setValue: aValue];
|
||||
[aTrigger setRelationType: reminderRelation];
|
||||
}
|
||||
[component removeAllAlarms];
|
||||
[component addToAlarms: anAlarm];
|
||||
|
||||
[anAlarm release];
|
||||
if (anAlarm)
|
||||
{
|
||||
[component removeAllAlarms];
|
||||
[component addToAlarms: anAlarm];
|
||||
[anAlarm release];
|
||||
}
|
||||
}
|
||||
|
||||
if (![self isChildOccurence])
|
||||
|
|
Loading…
Reference in New Issue