if (supplied_vevent != NULL) {
vevent = supplied_vevent;
/* If we're looking at a fully encapsulated VCALENDAR
- * rather than a VTODO component, attempt to use the first
- * relevant VTODO subcomponent. If there is none, the
+ * rather than a VEVENT component, attempt to use the first
+ * relevant VEVENT subcomponent. If there is none, the
* NULL returned by icalcomponent_get_first_component() will
* tell the next iteration of this function to create a
* new one.
" "
"<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Delete\">\n"
" "
+ "<INPUT TYPE=\"submit\" NAME=\"sc\" "
+ "VALUE=\"Check attendee availability\">\n"
+ " "
"<INPUT TYPE=\"submit\" NAME=\"sc\" VALUE=\"Cancel\">\n"
"</CENTER>\n"
);
if (supplied_vevent != NULL) {
vevent = supplied_vevent;
/* If we're looking at a fully encapsulated VCALENDAR
- * rather than a VTODO component, attempt to use the first
- * relevant VTODO subcomponent. If there is none, the
+ * rather than a VEVENT component, attempt to use the first
+ * relevant VEVENT subcomponent. If there is none, the
* NULL returned by icalcomponent_get_first_component() will
* tell the next iteration of this function to create a
* new one.
if (icalcomponent_isa(vevent) == ICAL_VCALENDAR_COMPONENT) {
save_individual_event(
icalcomponent_get_first_component(
- vevent, ICAL_VTODO_COMPONENT
+ vevent, ICAL_VEVENT_COMPONENT
), msgnum
);
return;
created_new_vevent = 1;
}
- if (!strcasecmp(bstr("sc"), "Save")) {
+ if ( (!strcasecmp(bstr("sc"), "Save"))
+ || (!strcasecmp(bstr("sc"), "Check attendee availability")) ) {
/* Replace values in the component with ones from the form */
}
/*
- * Serialize it and save it to the message base. We clone it first,
+ * Encapsulate event into full VCALENDAR component. Clone it first,
* for two reasons: one, it's easier to just free the whole thing
* when we're done instead of unbundling, but more importantly, we
* can't encapsulate something that may already be encapsulated
*/
lprintf(9, "Encapsulating into full VCALENDAR component\n");
encaps = ical_encapsulate_subcomponent(icalcomponent_new_clone(vevent));
+
+ /* If the user clicked 'Save' then save it to the server. */
lprintf(9, "Serializing it for saving\n");
- if (encaps != NULL) {
+ if ( (encaps != NULL) && (!strcasecmp(bstr("sc"), "Save")) ) {
serv_puts("ENT0 1|||4");
serv_gets(buf);
if (buf[0] == '4') {
}
icalcomponent_free(encaps);
}
+
+ /* Or, check attendee availability if the user asked for that. */
+ if ( (encaps != NULL) && (!strcasecmp(bstr("sc"), "Check attendee availability")) ) {
+
+ /* FIXME ... do the checking and annotating here, idiot */
+
+ /* This displays the form again, with our annotations */
+ display_edit_individual_event(encaps, msgnum);
+
+ icalcomponent_free(encaps);
+ }
+
}
/*
icalcomponent_free(vevent);
}
- /* Go back to the event list */
- readloop("readfwd");
+ /* If this was a save or deelete, go back to the calendar view. */
+ if (strcasecmp(bstr("sc"), "Check attendee availability")) {
+ readloop("readfwd");
+ }
}
</TR><TR>
<TD ALIGN="CENTER">
<SPAN CLASS="iconbar_link">
- <A HREF="/display_main_menu" TITLE="Advanced Options Menu: Advanced Room commands, Account Info, and Chat" TARGET="workspace"><IMG
- BORDER="0" WIDTH="32" HEIGHT="32" SRC="/static/advanced-icon.gif"><BR>Advanced options</A>
+ <A HREF="/display_main_menu"
+ TITLE="Advanced Options Menu: Advanced Room commands, Account Info, and Chat"
+ TARGET="workspace">
+ <IMG BORDER="0" WIDTH="32" HEIGHT="32" SRC="/static/advanced-icon.gif"><BR>
+ Advanced options</A>
</SPAN>
</TD>
</TR>
<TD ALIGN="CENTER">
<SPAN CLASS="iconbar_link">
<A HREF="/termquit" TITLE="Log off" TARGET="_top"
- onClick="return confirm('Do you really want to log off?');">
+ onClick="return confirm('Log off now?');">
<IMG BORDER="0" WIDTH="32" HEIGHT="32" SRC="/static/exit-icon.gif"><BR>Log off</A>
</SPAN>
</TD>
</TR><TR>
<TD ALIGN="CENTER">
<SPAN CLASS="powered_by">
- <A HREF="http://uncensored.citadel.org/citadel" TITLE="Find out more about Citadel/UX" TARGET="aboutcit"
+ <A HREF="http://uncensored.citadel.org/citadel"
+ TITLE="Find out more about Citadel/UX" TARGET="aboutcit"
onMouseOver="window.status='Find out more about Citadel/UX'; return true;">powered by<BR><IMG
BORDER="0" WIDTH="64" HEIGHT="64" SRC="/static/citadel-logo.jpg" ALT="CITADEL/UX"></A>
</SPAN>