#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
wprintf("<input type=\"text\" name=\"interval\" maxlength=\"3\" size=\"3\" ");
wprintf("value=\"%d\"> ", recur.interval);
- wprintf("<select name=\"freq\" size=\"1\">\n");
+ wprintf("<select name=\"freq\" id=\"freq_selector\" size=\"1\" "
+ "onclick=\"RecurrenceShowHide();\">\n");
for (i=0; i<(sizeof frequency_units / sizeof(char *)); ++i) {
/* We only want to offer daily, weekly, monthly, or yearly, which are
wprintf("</td></tr>\n");
+
+ wprintf("<div id=\"weekday_selector\">\n"); /* begin 'weekday_selector' div */
wprintf("<tr><td><b>");
wprintf("%s", _("on these weekdays:"));
wprintf("</b></td><td>");
-
char weekday_is_selected[7];
memset(weekday_is_selected, 0, 7);
}
wprintf("</td></tr>\n");
+ wprintf("</div>\n"); /* end 'weekday_selector' div */
+
wprintf("</table>\n");
wprintf("</div>\n"); /* end 'rrule' div */
// 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';
+ }
+
}