* Event editor dialog is now tabbed Event/Attendees/Recurrence when
running in TECH_PREVIEW mode. Attendees are *not* yet moved into
the Attendees tab. Recurrence rules are shown as serialized iCalendar
code rather than as an actual usable editor.
ritr = icalrecur_iterator_new(recur, dtstart);
if (!ritr) return;
ritr = icalrecur_iterator_new(recur, dtstart);
if (!ritr) return;
+ lprintf(9, "Recurrence found: %s\n", icalrecurrencetype_as_string(&recur));
+
while (next = icalrecur_iterator_next(ritr), !icaltime_is_null_time(next) ) {
++num_recur;
while (next = icalrecur_iterator_next(ritr), !icaltime_is_null_time(next) ) {
++num_recur;
- * \brief Display an event by itself (for editing)
- * \param supplied_vevent the event to edit
- * \param msgnum reference on the citserver
+ * Display an event by itself (for editing)
+ * supplied_vevent the event to edit
+ * msgnum reference on the citserver
*/
void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, char *from, int unread) {
icalcomponent *vevent;
*/
void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, char *from, int unread) {
icalcomponent *vevent;
if (supplied_vevent != NULL) {
vevent = supplied_vevent;
if (supplied_vevent != NULL) {
vevent = supplied_vevent;
* If we're looking at a fully encapsulated VCALENDAR
* rather than a VEVENT component, attempt to use the first
* relevant VEVENT subcomponent. If there is none, the
* If we're looking at a fully encapsulated VCALENDAR
* rather than a VEVENT component, attempt to use the first
* relevant VEVENT subcomponent. If there is none, the
created_new_vevent = 1;
}
created_new_vevent = 1;
}
- /** Learn the sequence */
+ /* Learn the sequence */
p = icalcomponent_get_first_property(vevent, ICAL_SEQUENCE_PROPERTY);
if (p != NULL) {
sequence = icalproperty_get_sequence(p);
}
p = icalcomponent_get_first_property(vevent, ICAL_SEQUENCE_PROPERTY);
if (p != NULL) {
sequence = icalproperty_get_sequence(p);
}
output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
wprintf("<h1>");
output_headers(1, 1, 2, 0, 0, 0);
wprintf("<div id=\"banner\">\n");
wprintf("<h1>");
wprintf("<div id=\"content\" class=\"service\">\n");
wprintf("<div id=\"content\" class=\"service\">\n");
- wprintf("<div class=\"fix_scrollbar_bug\">"
- "<table class=\"event_background\"><tr><td>\n");
+ wprintf("<div class=\"fix_scrollbar_bug\">");
+#ifndef TECH_PREVIEW
+ wprintf("<table class=\"event_background\"><tr><td>\n");
+#endif
/************************************************************
* Uncomment this to see the UID in calendar events for debugging
/************************************************************
* Uncomment this to see the UID in calendar events for debugging
wprintf("<INPUT TYPE=\"hidden\" NAME=\"day\" VALUE=\"%s\">\n",
bstr("day"));
wprintf("<INPUT TYPE=\"hidden\" NAME=\"day\" VALUE=\"%s\">\n",
bstr("day"));
- /** Put it in a borderless table so it lines up nicely */
+#ifdef TECH_PREVIEW
+ char *tabnames[] = { // FIXME localize these when the code is finished
+ "Event",
+ "Attendees",
+ "Recurrence"
+ };
+
+ tabbed_dialog(3, tabnames);
+ begin_tab(0, 3);
+#endif
+
+ /* Put it in a borderless table so it lines up nicely */
wprintf("<TABLE border=0 width=100%%>\n");
wprintf("<TR><TD><B>");
wprintf("<TABLE border=0 width=100%%>\n");
wprintf("<TR><TD><B>");
+#ifndef TECH_PREVIEW
+ wprintf("</td></tr></table>");
+#endif
- wprintf("</td></tr></table></div>\n");
+#ifdef TECH_PREVIEW
+ end_tab(0, 3);
+
+ /* Attendees tab (need to move things here) */
+ begin_tab(1, 3);
+ end_tab(1, 3);
+
+ /* Recurrence tab */
+ begin_tab(2, 3);
+ icalproperty *rrule = NULL;
+ struct icalrecurrencetype recur;
+
+ rrule = icalcomponent_get_first_property(vevent, ICAL_RRULE_PROPERTY);
+ if (rrule) {
+ recur = icalproperty_get_rrule(rrule);
+ wprintf("<tt>%s</tt><br />\n", icalrecurrencetype_as_string(&recur));
+ }
+ end_tab(2, 3);
+
+#endif
+
+ wprintf("</div>\n");
+
wprintf("<script type=\"text/javascript\">"
"eventEditAllDay();"
"</script>\n"
);
wprintf("<script type=\"text/javascript\">"
"eventEditAllDay();"
"</script>\n"
);
address_book_popup();
wDumpContent(1);
address_book_popup();
wDumpContent(1);
/** Or, check attendee availability if the user asked for that. */
if ( (encaps != NULL) && (havebstr("check_button")) ) {
/** Or, check attendee availability if the user asked for that. */
if ( (encaps != NULL) && (havebstr("check_button")) ) {
- /** Call this function, which does the real work */
+ /* Call this function, which does the real work */
check_attendee_availability(encaps);
/** This displays the form again, with our annotations */
check_attendee_availability(encaps);
/** This displays the form again, with our annotations */