return;
}
- lprintf(9, " * Was: %s\n", icaltime_as_ical_string(TheTime));
+ /* lprintf(9, " * Was: %s\n", icaltime_as_ical_string(TheTime)); */
if (TheTime.is_utc) {
- lprintf(9, " * This property is ALREADY UTC.\n");
+ /* lprintf(9, " * This property is ALREADY UTC.\n"); */
}
else {
/* Do the conversion. */
if (t != NULL) {
- lprintf(9, " * Timezone prop found. Converting to UTC.\n");
+ /* lprintf(9, " * Timezone prop found. Converting to UTC.\n"); */
}
else {
- lprintf(9, " * Converting default timezone to UTC.\n");
+ /* lprintf(9, " * Converting default timezone to UTC.\n"); */
}
if (t == NULL) {
}
icalproperty_remove_parameter_by_kind(prop, ICAL_TZID_PARAMETER);
- lprintf(9, " * Now: %s\n", icaltime_as_ical_string(TheTime));
+ /* lprintf(9, " * Now: %s\n", icaltime_as_ical_string(TheTime)); */
/* Now add the converted property back in. */
if (icalproperty_isa(prop) == ICAL_DTSTART_PROPERTY) {
void ical_dezonify(icalcomponent *cal) {
icalcomponent *vt = NULL;
- lprintf(9, "ical_dezonify() started\n");
+ /* lprintf(9, "ical_dezonify() started\n"); */
/* Convert all times to UTC */
ical_dezonify_recur(cal, cal);
icalcomponent_free(vt);
}
- lprintf(9, "ical_dezonify() completed\n");
+ /* lprintf(9, "ical_dezonify() completed\n"); */
}
#include "webcit.h"
#define MAX_SCRIPTS 100
+#define MAX_RULES 8
/**
* \brief view/edit sieve config
wprintf(_("Leave it in my inbox without filtering"));
wprintf("</option>\n");
- /*
- * FIXME uncomment this when we write the rules editor
- *
wprintf("<option value=\"1\">");
wprintf(_("Filter it according to rules selected below"));
wprintf("</option>\n");
- *
- */
wprintf("<option %s value=\"2\">", ((active_script >= 0) ? "selected" : ""));
wprintf(_("Filter it through a manually edited script (advanced users only)"));
/* The "webcit managed scripts" div */
wprintf("<div id=\"sievediv1\" style=\"display:none\">\n");
- wprintf("<div align=\"center\"><br /><br />");
- wprintf("FIXME");
- wprintf("<br /><br /></div>\n");
+ display_rules_editor_inner_div();
wprintf("</div>\n");
/* The "I'm smart and can write my own Sieve scripts" div */
display_add_remove_scripts(&buf[4]);
}
+
+
+
+void display_rules_editor_inner_div(void) {
+ int i;
+
+
+ wprintf("<br />");
+ wprintf("<table class=\"mailbox_summary\" rules=rows cellpadding=2 style=\"width:100%%;-moz-user-select:none;\">");
+
+ for (i=0; i<MAX_RULES; ++i) {
+
+ wprintf("<tr id=\"rule%d\">", i);
+
+ wprintf("<td>%d. %s</td>", i+1, _("If") );
+
+ wprintf("<td>");
+ wprintf("<select name=\"hfield%d\" size=1>", i);
+ wprintf("<option value=\"sender\">%s</option>", _("Sender"));
+ wprintf("<option value=\"recipient\">%s</option>", _("Recipient"));
+ wprintf("</select>");
+ wprintf("</td>");
+
+ wprintf("<td>");
+ wprintf("<select name=\"compare%d\" size=1>", i);
+ wprintf("<option value=\"match\">%s</option>", _("matches"));
+ wprintf("<option value=\"notmatch\">%s</option>", _("does not match"));
+ wprintf("</select>");
+ wprintf("</td>");
+
+ wprintf("<td>");
+ wprintf("<input type=\"text\" name=\"htext%d\">", i);
+ wprintf("</td>");
+
+ wprintf("<td>");
+ wprintf("<select name=\"action%d\" size=1>", i);
+ wprintf("<option value=\"fileinto\">%s</option>", _("file into"));
+ wprintf("<option value=\"redirect\">%s</option>", _("forward to"));
+ wprintf("<option value=\"reject\">%s</option>", _("reject"));
+ wprintf("</select>");
+ wprintf("</td>");
+
+ wprintf("<td>%s</td>", _("and then") );
+
+ wprintf("<td>");
+ wprintf("<select name=\"final%d\" size=1>", i);
+ wprintf("<option value=\"stop\">%s</option>", _("stop"));
+ wprintf("<option value=\"continue\">%s</option>", _("continue processing"));
+ wprintf("</select>");
+ wprintf("</td>");
+
+ wprintf("</tr>\n");
+
+ }
+
+ wprintf("</table>");
+
+
+
+/*
+
+Show/hide alternating rows. This is obviously bogus, it's just there to test the show/hide logic.
+
+ */
+
+ wprintf("<script type=\"text/javascript\"> \n"
+ " \n"
+ "function UpdateRules() { \n"
+ " for (i=0; i<%d; ++i) { \n", MAX_RULES);
+ wprintf(" if ( (i % 2) == 0 ) { \n"
+ " $('rule' + i).style.display = 'block'; \n"
+ " } \n"
+ " else { \n"
+ " $('rule' + i).style.display = 'none'; \n"
+ " } \n"
+ " } \n"
+ "} \n"
+ " \n"
+ "UpdateRules(); \n"
+ "</script> \n"
+ );
+
+}
+
+
+
+
+
+
/*@}*/