diff --git a/ChangeLog b/ChangeLog index ac1b5e78d..b52b8d511 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-01-16 Ludovic Marcotte + + * Minor adjustments / bug fixes to previous commit. + 2008-01-14 Ludovic Marcotte * Added files related to the custom recurrence diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index cbf8ead5a..789f21f7b 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -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? } diff --git a/UI/WebServerResources/UIxRecurrenceEditor.js b/UI/WebServerResources/UIxRecurrenceEditor.js index 17c11ca0d..06856f57e 100644 --- a/UI/WebServerResources/UIxRecurrenceEditor.js +++ b/UI/WebServerResources/UIxRecurrenceEditor.js @@ -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();