]> code.citadel.org Git - citadel.git/commitdiff
* messages.c: the summary line for each message is now a div containing fixed
authorArt Cancro <ajc@citadel.org>
Sun, 30 Oct 2005 05:41:54 +0000 (05:41 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 30 Oct 2005 05:41:54 +0000 (05:41 +0000)
  width floating spans instead of a table row.  This is being done as part of
  the preparations to ajaxify the presentation of this data.

webcit/ChangeLog
webcit/messages.c
webcit/static/webcit.css
webcit/webcit.c
webcit/webcit.h

index 5f6e3ccd72aca539deee21319b463c89a3dbcf16..85cdf4b26da960a994d13a62a0d21650cb02896e 100644 (file)
@@ -1,5 +1,10 @@
 $Id$
 
+Sun Oct 30 01:40:35 EDT 2005 ajc
+* messages.c: the summary line for each message is now a div containing fixed
+  width floating spans instead of a table row.  This is being done as part of
+  the preparations to ajaxify the presentation of this data.
+
 Thu Oct 27 16:57:38 EDT 2005 ajc
 * THIS IS 6.31
 
index a02296df53adc56ece5f0d9fedec100624bd71e8..6718d73dfb863b82f3d795c42f33d7f52959eac3 100644 (file)
@@ -805,7 +805,7 @@ void read_message(long msgnum, int printable_view, char *section) {
                        );
                }
 
-               wprintf("<a href=\"#\" onClick=\"window.open('/printmsg?msgnum=%ld', 'print%ld', 'toolbar=no,location=no,directories=no,copyhistory=no,status=yes,scrollbars=yes,resizable=yes,width=600,height=400'); \" >"
+               wprintf("<a href=\"#\" onClick=\"window.open('/printmsg/%ld', 'print%ld', 'toolbar=no,location=no,directories=no,copyhistory=no,status=yes,scrollbars=yes,resizable=yes,width=600,height=400'); \" >"
                        "[%s]</a>", msgnum, msgnum, _("Print"));
 
                wprintf("</td>");
@@ -991,10 +991,10 @@ ENDBODY:
  * Unadorned HTML output of an individual message, suitable
  * for placing in a hidden iframe, for printing, or whatever
  */
-void embed_message(void) {
+void embed_message(char *msgnum_as_string) {
        long msgnum = 0L;
 
-       msgnum = atol(bstr("msgnum"));
+       msgnum = atol(msgnum_as_string);
        begin_ajax_response();
        read_message(msgnum, 0, "");
        end_ajax_response();
@@ -1004,10 +1004,10 @@ void embed_message(void) {
 /*
  * Printable view of a message
  */
-void print_message(void) {
+void print_message(char *msgnum_as_string) {
        long msgnum = 0L;
 
-       msgnum = atol(bstr("msgnum"));
+       msgnum = atol(msgnum_as_string);
        output_headers(0, 0, 0, 0, 0, 0);
 
        wprintf("Content-type: text/html\r\n"
@@ -1338,34 +1338,32 @@ ENDBODY:
 void display_summarized(int num) {
        char datebuf[64];
 
-       wprintf("<tr bgcolor=\"#%s\" ",
-               ((num % 2) ? "DDDDDD" : "FFFFFF")
-       );
-
-       wprintf("onClick=\" new Ajax.Updater('preview_pane', '/msg', { method: 'get', parameters: 'msgnum=%ld' } ); \" ", WC->summ[num].msgnum);
+       wprintf("<div id=\"m%ld\" style=\"font-weight:%s\" onClick=\" new Ajax.Updater('preview_pane', '/msg/%d', { method: 'get' } ); \" ",
+               WC->summ[num].msgnum,
+               (WC->summ[num].is_new ? "bold" : "normal"),
+               WC->summ[num].msgnum);
        wprintf(">");
 
-       wprintf("<TD>");
-       if (WC->summ[num].is_new) wprintf("<B>");
+       wprintf("<span style=\"float:left;width:45%%;background-color:#fff\">");
        escputs(WC->summ[num].subj);
-       if (WC->summ[num].is_new) wprintf("</B>");
-       wprintf("</TD><TD>");
-       if (WC->summ[num].is_new) wprintf("<B>");
+       wprintf("</span>");
+
+       wprintf("<span style=\"float:left;width:35%%;background-color:#fff\">");
        escputs(WC->summ[num].from);
-       if (WC->summ[num].is_new) wprintf("</B>");
-       wprintf(" </TD><TD>");
-       if (WC->summ[num].is_new) wprintf("<B>");
+       wprintf("</span>");
+
+       wprintf("<span style=\"float:left;width:15%%;background-color:#fff\">");
        fmt_date(datebuf, WC->summ[num].date, 1);       /* brief */
        escputs(datebuf);
-       if (WC->summ[num].is_new) wprintf("</B>");
-       wprintf(" </TD>");
-       wprintf("<TD>"
-               "<INPUT TYPE=\"checkbox\" NAME=\"msg_%ld\" VALUE=\"yes\">"
-               "</TD>",
+       wprintf("</span>");
+
+       wprintf("<span style=\"float:left;width:5%%;background-color:#fff\">");
+       wprintf("<INPUT TYPE=\"checkbox\" NAME=\"msg_%ld\" VALUE=\"yes\">",
                WC->summ[num].msgnum
        );
+       wprintf("</span>");
 
-       wprintf("</tr>\n");
+       wprintf("</div>\n");
 }
 
 
@@ -2003,17 +2001,13 @@ void readloop(char *oper)
                        "method=\"POST\" action=\"/do_stuff_to_msgs\">\n"
 
                        "<span class=\"mailbox_summary\">"
-                       "<table border=0 cellspacing=0 "
-                       "cellpadding=0 width=100%%>\n"
-                       "<TR>"
-                       "<TD align=center><b><i>%s</i></b> %s</TD>"
-                       "<TD align=center><b><i>%s</i></b> %s</TD>"
-                       "<TD align=center><b><i>%s</i></b> %s</TD>"
-                       "<TD><INPUT TYPE=\"submit\" NAME=\"delete_button\" "
-                       "STYLE=\"font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif;"
-                       " font-size: 6pt;\" "
-                       "VALUE=\"%s\"></TD>"
-                       "</TR>\n"
+                       "<div id=\"summary_headers\" style=\"width:100%%\">"
+                       "<span style=\"float:left;width:45%%\"><b><i>%s</i></b> %s</span>"
+                       "<span style=\"float:left;width:35%%\"><b><i>%s</i></b> %s</span>"
+                       "<span style=\"float:left;width:10%%\"><b><i>%s</i></b> %s</span>"
+                       "<span style=\"float:left;width:10%%\">"
+                       "<INPUT type=\"submit\" name=\"delete_button\" style=\"font-size:6pt\" value=\"%s\"></span>"
+                       "</div>\n"
                        ,
                        _("Subject"),   subjsort_button,
                        _("Sender"),    sendsort_button,
@@ -2065,7 +2059,7 @@ void readloop(char *oper)
        }
 
        if (is_summary) {
-               wprintf("</table></span></form>"
+               wprintf("</span></form>"
                        "</div>\n");                    /* end of 'fix_scrollbar_bug' div */
                wprintf("</div>");                      /* end of 'message_list' div */
 
index 6ffed576b3230c7a2d8b8a4bcbc6fe9117acfb26..8f54e9fdafc83058f789691c827e7a8ea185f292 100644 (file)
@@ -271,12 +271,6 @@ a:hover {
        color: #FFFFEE;
 }
 
-.youhavemail {
-       font-size: 6pt;
-       font-style: italic;
-       color: #000044;
-}
-
 .customize {
        font-size: 8pt;
        font-style: italic;
@@ -331,7 +325,8 @@ a:hover {
        color: #000000;
 }
 
-/* Quote Levels Colors */
+<!-- begin quote levels colors -->
+
 blockquote {
        color: navy !important; background-color: RGB(245,245,245) !important; 
 }
@@ -353,6 +348,8 @@ blockquote pre {
        margin-right: 1%;
 }
 
+<!-- end quote levels colors -->
+
 var sub {
        font-style: normal;
 }
index 9abea1538c32994a56df12c10a8f583a9c4685cb..ffb40a9c72d20091a239f854eaafc9604b5a1a36 100644 (file)
@@ -1234,9 +1234,9 @@ void session_loop(struct httprequest *req)
        } else if (!strcasecmp(action, "headers")) {
                readloop("headers");
        } else if (!strcasecmp(action, "msg")) {
-               embed_message();
+               embed_message(arg1);
        } else if (!strcasecmp(action, "printmsg")) {
-               print_message();
+               print_message(arg1);
        } else if (!strcasecmp(action, "display_enter")) {
                display_enter();
        } else if (!strcasecmp(action, "post")) {
index cf126c41a4d21f060f66b6c75a3c96205a30d102..e365a9f96cad83b30619616f7de79f28f8be2ce1 100644 (file)
@@ -386,8 +386,8 @@ void embed_main_menu(void);
 void serv_read(char *buf, int bytes);
 int haschar(char *, char);
 void readloop(char *oper);
-void embed_message(void);
-void print_message(void);
+void embed_message(char *msgnum_as_string);
+void print_message(char *msgnum_as_string);
 void text_to_server(char *ptr, int convert_to_html);
 void display_enter(void);
 void post_message(void);