From: Art Cancro Date: Fri, 10 Oct 2008 17:12:05 +0000 (+0000) Subject: Wrote a few more lines of code X-Git-Tag: v7.86~1863 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=e2baf70471d1f4b1f0b7dce070d380f0ff7e2e64 Wrote a few more lines of code of the recurrence editor. --- diff --git a/webcit/event.c b/webcit/event.c index fb49aeaeb..9bce4ce2a 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -443,6 +443,15 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, _("never") }; + char *ordinals[] = { + "0", + _("first"), + _("second"), + _("third"), + _("fourth"), + _("fifth") + }; + wprintf(""); wprintf(_("Recurrence rule")); wprintf(""); @@ -493,7 +502,7 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, wprintf("\n"); /* end 'weekday_selector' div */ - int which_rrmonthtype_is_preselected = 0; /* FIXME */ + int which_rrmonthtype_is_preselected = 0; /* FIXME set default correctly */ wprintf("
"); /* begin 'monthday_selector' div */ @@ -501,15 +510,44 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, "%s onChange=\"RecurrenceShowHide();\">", ((which_rrmonthtype_is_preselected == 0) ? "checked" : "") ); - wprintf("on day FIXME of the month"); /* FIXME */ + + char mdaybox[128]; + snprintf(mdaybox, sizeof mdaybox, + "", 0); /* FIXME set the correct default */ + wprintf(_("on day %s of the month"), mdaybox); wprintf("
\n"); wprintf("", ((which_rrmonthtype_is_preselected == 1) ? "checked" : "") ); - wprintf("on the FIXME FIXME of the month"); /* FIXME */ - wprintf("
\n"); + + wprintf(_("on the ")); + wprintf(" \n"); + + wprintf(""); + + wprintf(" %s
\n", _("of the month")); wprintf("
\n"); /* end 'monthday_selector' div */ diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index b953edfbb..c5a446e13 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -1027,4 +1027,20 @@ function RecurrenceShowHide() { $('rruntil').disabled = true; } + if ($('rrmonthtype_mday').checked) { + $('rrmday').disabled = false; + } + else { + $('rrmday').disabled = true; + } + + if ($('rrmonthtype_wday').checked) { + $('rrmweek').disabled = false; + $('rrmweekday').disabled = false; + } + else { + $('rrmweek').disabled = true; + $('rrmweekday').disabled = true; + } + }