wprintf("<div id=\"content\" class=\"service\">\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
wprintf("<INPUT TYPE=\"hidden\" NAME=\"day\" VALUE=\"%s\">\n",
bstr("day"));
-#ifdef TECH_PREVIEW
- char *tabnames[] = { // FIXME localize these when the code is finished
- "Event",
- "Attendees",
- "Recurrence"
+ char *tabnames[] = {
+ _("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("</TD></TR>\n");
- /**
+ /*
* If this is an all-day-event, set the end time to be identical to
* the start time (the hour/minute/second will be set to midnight).
* Otherwise extract or create it.
t_end = icalproperty_get_dtend(p);
}
else {
- /**
+ /*
* If this is not an all-day event and there is no
* end time specified, make the default one hour
* from the start time.
wprintf("</TD></TR>\n");
- /** Attendees */
+
+ /** Done with properties. */
+ wprintf("</TABLE>\n");
+
+ end_tab(0, 3);
+
+ /* Attendees tab (need to move things here) */
+ begin_tab(1, 3);
+ wprintf("<TABLE border=0 width=100%%>\n"); /* same table style as the event tab */
wprintf("<TR><TD><B>");
wprintf(_("Attendees"));
wprintf("</B><br />"
_("Attendees"),
_("Contacts")
);
- /** Pop open an address book -- end **/
+ /* Pop open an address book -- end **/
wprintf("</TD><TD>"
"<TEXTAREA %s NAME=\"attendees\" id=\"attendees_box\" wrap=soft "
}
}
wprintf("</TEXTAREA></TD></TR>\n");
+ wprintf("</TABLE>\n");
+ end_tab(1, 3);
- /** Done with properties. */
- wprintf("</TABLE>\n<CENTER>"
+ /* 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);
+
+ /* submit buttons (common area beneath the tabs) */
+ begin_tab(3, 3);
+ wprintf("<CENTER>"
"<INPUT TYPE=\"submit\" NAME=\"save_button\" VALUE=\"%s\">"
" "
"<INPUT TYPE=\"submit\" NAME=\"delete_button\" VALUE=\"%s\">\n"
_("Check attendee availability"),
_("Cancel")
);
-
wprintf("</FORM>\n");
-#ifndef TECH_PREVIEW
- wprintf("</td></tr></table>");
-#endif
-
-#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
+ end_tab(3, 3);
wprintf("</div>\n");
}
}
-/**
- * \brief Save an edited event
- * \param supplied_vevent the event to save
- * \param msgnum the index on the citserver
+/*
+ * Save an edited event
+ *
+ * supplied_vevent: the event to save
+ * msgnum: the index on the citserver
*/
void save_individual_event(icalcomponent *supplied_vevent, long msgnum, char *from, int unread) {
char buf[SIZ];
}
- /**
+ /*
* If the user clicked 'Delete' then delete it.
*/
if ( (havebstr("delete_button")) && (msgnum > 0L) ) {
icalcomponent_free(vevent);
}
- /** If this was a save or delete, go back to the calendar view. */
+ /* If this was a save or delete, go back to the calendar view. */
if (!havebstr("check_button")) {
readloop("readfwd");
}
wprintf("</tr></table>\n");
end_tab((num_pages-1), num_pages);
+ begin_tab(num_pages, num_pages); /* There are no submit buttons so this is empty */
+ end_tab(num_pages, num_pages);
+
for (i=0; i<num_pages; ++i) {
free(tablabels[i]);
}
-/**
- * \brief load message pointers from the server
- * \param servcmd the citadel command to send to the citserver
- * \param with_headers what headers???
+/*
+ * load message pointers from the server for a "read messages" operation
+ *
+ * servcmd: the citadel command to send to the citserver
+ * with_headers: also include some of the headers with the message numbers (more expensive)
*/
int load_msg_ptrs(char *servcmd, int with_headers)
{
typedef int (*QSortFunction) (const void*, const void*);
-/**
- * \brief qsort() compatible function to compare two longs in descending order.
- *
- * \param s1 first number to compare
- * \param s2 second number to compare
+
+/*
+ * qsort() compatible function to compare two longs in descending order.
*/
int longcmp_r(const void *s1, const void *s2) {
long l1;
}
-/**
- * \brief qsort() compatible function to compare two message summary structs by ascending subject.
- *
- * \param s1 first item to compare
- * \param s2 second item to compare
+/*
+ * qsort() compatible function to compare two message summary structs by ascending subject.
*/
int summcmp_subj(const void *s1, const void *s2) {
struct message_summary *summ1;
return strcasecmp(summ1->subj, summ2->subj);
}
-/**
- * \brief qsort() compatible function to compare two message summary structs by descending subject.
- *
- * \param s1 first item to compare
- * \param s2 second item to compare
+/*
+ * qsort() compatible function to compare two message summary structs by descending subject.
*/
int summcmp_rsubj(const void *s1, const void *s2) {
struct message_summary *summ1;
return strcasecmp(summ2->subj, summ1->subj);
}
-/**
- * \brief qsort() compatible function to compare two message summary structs by ascending sender.
- *
- * \param s1 first item to compare
- * \param s2 second item to compare
+/*
+ * qsort() compatible function to compare two message summary structs by ascending sender.
*/
int summcmp_sender(const void *s1, const void *s2) {
struct message_summary *summ1;
return strcasecmp(summ1->from, summ2->from);
}
-/**
- * \brief qsort() compatible function to compare two message summary structs by descending sender.
- *
- * \param s1 first item to compare
- * \param s2 second item to compare
+/*
+ * qsort() compatible function to compare two message summary structs by descending sender.
*/
int summcmp_rsender(const void *s1, const void *s2) {
struct message_summary *summ1;
return strcasecmp(summ2->from, summ1->from);
}
-/**
- * \brief qsort() compatible function to compare two message summary structs by ascending date.
- *
- * \param s1 first item to compare
- * \param s2 second item to compare
+/*
+ * qsort() compatible function to compare two message summary structs by ascending date.
*/
int summcmp_date(const void *s1, const void *s2) {
struct message_summary *summ1;
else return 0;
}
-/**
- * \brief qsort() compatible function to compare two message summary structs by descending date.
- *
- * \param s1 first item to compare
- * \param s2 second item to compare
+/*
+ * qsort() compatible function to compare two message summary structs by descending date.
*/
int summcmp_rdate(const void *s1, const void *s2) {
struct message_summary *summ1;
eUnSet
};
-/** SortEnum to plain string representation */
+/* SortEnum to plain string representation */
static const char* SortByStrings[] = {
"date",
"rdate",
"unset"
};
-/** SortEnum to sort-Function Table */
+/* SortEnum to sort-Function Table */
const QSortFunction SortFuncs[eUnSet] = {
summcmp_date,
summcmp_rdate,
summcmp_rdate
};
-/** given a SortEnum, which icon should we choose? */
+/* given a SortEnum, which icon should we choose? */
const int SortDateToIcon[eUnSet] = { eUp, eDown, eNone, eNone, eNone, eNone, eNone};
const int SortSubjectToIcon[eUnSet] = { eNone, eNone, eUp, eDown, eNone, eNone, eNone};
const int SortSenderToIcon[eUnSet] = { eNone, eNone, eNone, eNone, eUp, eDown, eNone};
-/** given a SortEnum, which would be the "opposite" search option? */
+/* given a SortEnum, which would be the "opposite" search option? */
const int DateInvertSortString[eUnSet] = { eRDate, eDate, eDate, eDate, eDate, eDate, eDate};
const int SubjectInvertSortString[eUnSet] = { eSubject, eSubject, eRSubject, eUnSet, eSubject, eSubject, eSubject};
const int SenderInvertSortString[eUnSet] = { eSender, eSender, eSender, eSender, eRSender, eUnSet, eSender};
-/**
- * \Brief Translates sortoption String to its SortEnum representation
- * \param SortBy string to translate
- * \return the enum matching the string; defaults to RDate
+/*
+ * Translates sortoption String to its SortEnum representation
+ * returns the enum matching the string; defaults to RDate
*/
//SortByEnum
int StrToESort (const StrBuf *sortby)
-/**
- * \brief command loop for reading messages
+/*
+ * command loop for reading messages
*
- * \param oper Set to "readnew" or "readold" or "readfwd" or "headers"
+ * Set oper to "readnew" or "readold" or "readfwd" or "headers"
*/
void readloop(char *oper)
{
}
SortBy = StrToESort(sortpref_value);
- /** message board sort */
+ /* message board sort */
if (SortBy == eReverse) {
bbs_reverse = 1;
}
output_headers(1, 1, 1, 0, 0, 0);
- /**
+ /*
* When in summary mode, always show ALL messages instead of just
* new or old. Otherwise, show what the user asked for.
*/
SortBy = eRDate;
}
- /**
+ /*
* Are we doing a summary view? If so, we need to know old messages
* and new messages, so we can do that pretty boldface thing for the
* new messages.
*
*/
void begin_tab(int tabnum, int num_tabs) {
- wprintf("<!-- begin tab %d of %d -->\n", tabnum, num_tabs);
- wprintf("<div id=\"tabdiv%d\" style=\"display:%s\" class=\"tabcontent\" >",
- tabnum,
- ( (tabnum == 0) ? "block" : "none" )
- );
+
+ if (tabnum == num_tabs) {
+ wprintf("<!-- begin tab-common epilogue -->\n");
+ wprintf("<div class=\"tabcontent_submit\">");
+ }
+
+ else {
+ wprintf("<!-- begin tab %d of %d -->\n", tabnum, num_tabs);
+ wprintf("<div id=\"tabdiv%d\" style=\"display:%s\" class=\"tabcontent\" >",
+ tabnum,
+ ( (tabnum == 0) ? "block" : "none" )
+ );
+ }
}
/*
*
*/
void end_tab(int tabnum, int num_tabs) {
- wprintf("</div>\n");
- wprintf("<!-- end tab %d of %d -->\n", tabnum, num_tabs);
-
- if (tabnum == num_tabs-1) {
- wprintf("<script type=\"text/javascript\">"
- " Nifty(\"table#TheTabs td\", \"small transparent top\");"
- "</script>"
- );
+ if (tabnum == num_tabs) {
+ wprintf("</div>\n");
+ wprintf("<!-- end tab-common epilogue -->\n");
+ }
+ else {
+ wprintf("</div>\n");
+ wprintf("<!-- end tab %d of %d -->\n", tabnum, num_tabs);
+
+ if (tabnum == num_tabs-1) {
+ wprintf("<script type=\"text/javascript\">"
+ " Nifty(\"table#TheTabs td\", \"small transparent top\");"
+ "</script>"
+ );
+ }
}
}