see changelog

Monotone-Parent: 6ead4733302fbf149fcd9936a6e3eb9f4a85acac
Monotone-Revision: 656122c69a0d8d7212bed5df2febbb397d3ff7de

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2008-01-16T17:07:46
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Ludovic Marcotte
2008-01-16 17:07:46 +00:00
parent 82e6e94a82
commit f4fd9e1fa6
3 changed files with 25 additions and 15 deletions

View File

@@ -1,3 +1,7 @@
2008-01-16 Ludovic Marcotte <ludovic@inverse.ca>
* Minor adjustments / bug fixes to previous commit.
2008-01-14 Ludovic Marcotte <ludovic@inverse.ca>
* Added files related to the custom recurrence

View File

@@ -197,7 +197,7 @@
- (NSString *) _dayMaskToInteger: (unsigned int) theMask
{
NSMutableString *s;
unsigned int i, v;
unsigned int i;
unsigned char maskDays[] = { iCalWeekDayMonday, iCalWeekDayTuesday,
iCalWeekDayWednesday, iCalWeekDayThursday,
@@ -229,17 +229,6 @@
rule = [[component recurrenceRules] lastObject];
// If we either have an end date or a recurrence count
// it's automatically a CUSTOM one.
//if (![rule isInfinite] || [rule repeatInterval] != 1)
// {
// // We initialize the proper ivars
// repeatType = @"1";
// repeat1 = @"1";
// repeat2 = @"1,3,5";
// return;
// }
if ([rule frequency] == iCalRecurrenceFrequenceDaily)
{
repeatType = @"0";
@@ -260,7 +249,7 @@
{
repeat1 = @"0";
if ([rule repeatInterval] == 1)
if ([rule repeatInterval] == 1 && [rule isInfinite])
{
repeat = @"DAILY";
}
@@ -1320,10 +1309,13 @@ RANGE(2);
// Repeat until date
else if (range == 2)
{
[theRule setUntilDate: [NSCalendarDate dateWithString: [self range2]
calendarFormat: @"%Y-%m-%d"]];
}
// No end date.
else
{
// Do nothing?
}

View File

@@ -131,7 +131,7 @@ function initializeFormValues() {
$('rangeAppointmentsField').value = parent$("range2").value;
}
else if (range == 2) {
$('endDate').value = parent$("range2").value;
$('endDate_date').value = parent$("range2").value;
$('endDate_date').disabled = false;
}
@@ -189,6 +189,13 @@ function onEditorOkClick(event) {
parent$("repeat4").value = $('monthlyDay').value;
parent$("repeat5").value = getSelectedDays($('month'));
// FIXME - right now we do not support rules
// such as The Second Tuesday...
if (parent$("repeat2").value == 0) {
window.alert("This type of recurrence is currently unsupported.");
return false;
}
// We check if the monthlyMonthsField really contains an integer
v = parseInt(v);
if (isNaN(v) || v <= 0) {
@@ -206,6 +213,13 @@ function onEditorOkClick(event) {
parent$("repeat6").value = $('yearlyDay').value;
parent$("repeat7").value = $('yearlyMonth2').value;
// FIXME - right now we do not support rules
// such as Every Second Tuesday of February
if (parent$("repeat2").value == 1) {
window.alert("This type of recurrence is currently unsupported.");
return false;
}
// We check if the yearlyYearsField really contains an integer
v = parseInt(parent$("repeat1").value);
if (isNaN(v) || v <= 0) {
@@ -228,7 +242,7 @@ function onEditorOkClick(event) {
}
}
else if (range == 2) {
parent$("range2").value = $('endDate').value;
parent$("range2").value = $('endDate_date').value;
}
window.close();