recurrence editor
authorArt Cancro <ajc@citadel.org>
Tue, 23 Sep 2008 17:36:11 +0000 (17:36 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 23 Sep 2008 17:36:11 +0000 (17:36 +0000)
webcit/event.c
webcit/static/wclib.js

index 4618e8bd695319d72e5c10c564ca2bd118a93a9f..dcce662e2cf2b3774984dc25a87b46d2a526b6f2 100644 (file)
@@ -448,20 +448,13 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum,
        wprintf("value=\"%d\"> ", recur.interval);
 
        wprintf("<select name=\"freq\" id=\"freq_selector\" size=\"1\" "
-               "onclick=\"RecurrenceShowHide();\">\n");
+               "onChange=\"RecurrenceShowHide();\">\n");
        for (i=0; i<(sizeof frequency_units / sizeof(char *)); ++i) {
-
-               /* We only want to offer daily, weekly, monthly, or yearly, which are
-                * options 3 through 6, but if one of the others hapens to be selected,
-                * we will grudgingly add it to the list of options.
-                */
-               if ( (i == recur.freq) || ((i>=3) && (i<=6)) ) {
-                       wprintf("<option %s value=\"%d\">%s</option>\n",
-                               ((i == recur.freq) ? "selected" : ""),
-                               i,
-                               frequency_units[i]
-                       );
-               }
+               wprintf("<option %s value=\"%d\">%s</option>\n",
+                       ((i == recur.freq) ? "selected" : ""),
+                       i,
+                       frequency_units[i]
+               );
        }
 
        wprintf("</td></tr>\n");
index 00d6c577ff80b79a150c92921af4d8588d6c6f31..7b61e03c03ac1827b275fe3fba2ca478f54b5d3a 100644 (file)
@@ -994,6 +994,8 @@ function RecurrenceShowHide() {
                $('rrule').style.display = 'none';
        }
 
+       alert('selected index is ' + $('freq_selector').selectedIndex );
+
        if ($('freq_selector').selectedIndex == 4) {
                $('weekday_selector').style.display = 'block';
        }