From: Art Cancro Date: Tue, 23 Sep 2008 17:33:36 +0000 (+0000) Subject: recurrence editor X-Git-Tag: v7.86~1915 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=05c1e175066b9a5f05d4cb524ebc39b8504ec5e3 recurrence editor --- diff --git a/webcit/event.c b/webcit/event.c index 51c59c087..4618e8bd6 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -7,21 +7,6 @@ #include "webcit.h" #include "webserver.h" - - - - struct tm tm; - time_t thetime; - int i; - - - - - - - - - /* * Display an event by itself (for editing) * supplied_vevent the event to edit @@ -462,7 +447,8 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, wprintf(" ", recur.interval); - wprintf("\n"); for (i=0; i<(sizeof frequency_units / sizeof(char *)); ++i) { /* We only want to offer daily, weekly, monthly, or yearly, which are @@ -480,11 +466,12 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, wprintf("\n"); + + wprintf("
\n"); /* begin 'weekday_selector' div */ wprintf(""); wprintf("%s", _("on these weekdays:")); wprintf(""); - char weekday_is_selected[7]; memset(weekday_is_selected, 0, 7); @@ -508,6 +495,8 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, } wprintf("\n"); + wprintf("
\n"); /* end 'weekday_selector' div */ + wprintf("\n"); wprintf("\n"); /* end 'rrule' div */ diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index 1b3b8f78c..00d6c577f 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -986,10 +986,19 @@ function eventEditAllDay() { // Functions which handle show/hide of various elements in the recurrence editor function RecurrenceShowHide() { + if ($('is_recur').checked) { $('rrule').style.display = 'block'; } else { $('rrule').style.display = 'none'; } + + if ($('freq_selector').selectedIndex == 4) { + $('weekday_selector').style.display = 'block'; + } + else { + $('weekday_selector').style.display = 'none'; + } + }