]> code.citadel.org Git - citadel.git/blobdiff - webcit/calendar_view.c
* Started changing some of the top-level tables from 100% width to 99%
[citadel.git] / webcit / calendar_view.c
index f9f8164dff18ef89b37e5d33a4f6f0db2c00c35b..1dfbf351d1629edac0b5e67aa07f44be110e2bcb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * $Id$
  *
- *
+ * Handles the HTML display of calendar items.
  */
 
 #include <ctype.h>
@@ -78,14 +78,6 @@ void calendar_month_view_display_events(time_t thetime) {
                                localtime_r(&event_tt, &event_tm);
                        }
 
-lprintf(9, "Event: %04d-%s-%02d, Now: %04d-%s-%02d\n",
-       event_tm.tm_year + 1900,
-       ascmonths[event_tm.tm_mon],
-       event_tm.tm_mday,
-       today_tm.tm_year + 1900,
-       ascmonths[today_tm.tm_mon],
-       today_tm.tm_mday);
-
                        if ((event_tm.tm_year == today_tm.tm_year)
                           && (event_tm.tm_mon == today_tm.tm_mon)
                           && (event_tm.tm_mday == today_tm.tm_mday)) {
@@ -163,13 +155,11 @@ void calendar_month_view(int year, int month, int day) {
        }
 
        /* Outer table (to get the background color) */
-       wprintf("<TABLE width=100%% border=0 cellpadding=0 cellspacing=0 "
+       wprintf("<center>"
+               "<TABLE width=99%% border=0 cellpadding=0 cellspacing=0 "
                "bgcolor=#204B78><TR><TD>\n");
 
        wprintf("<TABLE width=100%% border=0 cellpadding=0 cellspacing=0><tr>\n");
-       wprintf("<TD align=left><font color=#FFFFFF size=-2>"
-               "Click on any date for day view&nbsp;"
-               "</FONT></TD>\n");
 
        wprintf("<TD ALIGN=CENTER>");
 
@@ -189,9 +179,7 @@ void calendar_month_view(int year, int month, int day) {
                (int)(tm.tm_year)+1900, tm.tm_mon + 1);
        wprintf("<IMG ALIGN=MIDDLE SRC=\"/static/forward.gif\" BORDER=0></A>\n");
 
-       wprintf("</TD><TD align=right><font color=#FFFFFF size=-2>"
-               "Click on any date for day view&nbsp;"
-               "</FONT></TD></TR></TABLE>\n");
+       wprintf("</TD></TR></TABLE>\n");
 
        /* Inner table (the real one) */
        wprintf("<TABLE width=100%% border=0 cellpadding=1 cellspacing=1 "
@@ -211,7 +199,7 @@ void calendar_month_view(int year, int month, int day) {
                        wprintf("<TR>");
                }
 
-               wprintf("<TD BGCOLOR=\"#%s\" WIDTH=14%% HEIGHT=60 VALIGN=TOP><B>",
+               wprintf("<TD BGCOLOR=\"#%s\" WIDTH=14%% HEIGHT=60 align=left VALIGN=TOP><B>",
                        ((tm.tm_mon != month-1) ? "DDDDDD" :
                        ((tm.tm_wday==0 || tm.tm_wday==6) ? "EEEECC" :
                        "FFFFFF"))
@@ -347,7 +335,8 @@ void calendar_day_view(int year, int month, int day) {
 
 
        /* Outer table (to get the background color) */
-       wprintf("<TABLE width=100%% border=0 cellpadding=0 cellspacing=0 "
+       wprintf("<center>"
+               "<TABLE width=99%% border=0 cellpadding=0 cellspacing=0 "
                "bgcolor=#204B78><TR><TD>\n");
 
        /* Inner table (the real one) */
@@ -454,7 +443,7 @@ void calendar_day_view(int year, int month, int day) {
 
 
        wprintf("</TR></TABLE>"                 /* end of inner table */
-               "</TD></TR></TABLE>"            /* end of outer table */
+               "</TD></TR></TABLE></center>"   /* end of outer table */
        );
 
 
@@ -680,10 +669,6 @@ void do_tasks_view(void) {
 
        wprintf("</TABLE>\n");
 
-       wprintf("<hr /><A HREF=\"/display_edit_task?msgnum=0\">"
-               "Add new task</A>\n"
-       );
-
        do_template("endbox");