fix the reply subject bug
authorThierry Pasqualier <thierry@uncensored.citadel.org>
Mon, 16 Jul 2007 21:55:02 +0000 (21:55 +0000)
committerThierry Pasqualier <thierry@uncensored.citadel.org>
Mon, 16 Jul 2007 21:55:02 +0000 (21:55 +0000)
webcit/messages.c
webcit/static/webcit.css

index fe088d85eb3f8156bf14dcd0dcd5f4dd120d6e96..ee35b5ea54c4ab9353be8f425be03b2eb5b24cee 100644 (file)
@@ -720,99 +720,9 @@ void read_message(long msgnum, int printable_view, char *section) {
                 wprintf("onMouseOut=document.getElementById(\"msg%ld\").style.visibility=\"hidden\" >", msgnum);
         }
 
-        /** start msg buttons */
-
-        if (!printable_view) {
-                wprintf("<p id=\"msg%ld\" class=\"msgbuttons\" >\n",msgnum);
-
-               /** Reply */
-               if ( (WC->wc_view == VIEW_MAILBOX) || (WC->wc_view == VIEW_BBS) ) {
-                       wprintf("<a href=\"display_enter");
-                       if (WC->is_mailbox) {
-                               wprintf("?replyquote=%ld", msgnum);
-                       }
-                       wprintf("?recp=");
-                       urlescputs(reply_to);
-                       if (!IsEmptyStr(m_subject)) {
-                               wprintf("?subject=");
-                               if (strncasecmp(m_subject, "Re:", 3)) wprintf("Re:%20");
-                               urlescputs(m_subject);
-                       }
-                       wprintf("\"><span>[</span>%s<span>]</span></a> ", _("Reply"));
-               }
-
-               /** ReplyQuoted */
-               if ( (WC->wc_view == VIEW_MAILBOX) || (WC->wc_view == VIEW_BBS) ) {
-                       if (!WC->is_mailbox) {
-                               wprintf("<a href=\"display_enter");
-                               wprintf("?replyquote=%ld", msgnum);
-                               wprintf("?recp=");
-                               urlescputs(reply_to);
-                               if (!IsEmptyStr(m_subject)) {
-                                       wprintf("?subject=");
-                                       if (strncasecmp(m_subject, "Re:", 3)) wprintf("Re:%20");
-                                       urlescputs(m_subject);
-                               }
-                               wprintf("\"><span>[</span>%s<span>]</span></a> ", _("ReplyQuoted"));
-                       }
-               }
-
-               /** ReplyAll */
-               if (WC->wc_view == VIEW_MAILBOX) {
-                       wprintf("<a href=\"display_enter");
-                       wprintf("?replyquote=%ld", msgnum);
-                       wprintf("?recp=");
-                       urlescputs(reply_to);
-                       wprintf("?cc=");
-                       urlescputs(reply_all);
-                       if (!IsEmptyStr(m_subject)) {
-                               wprintf("?subject=");
-                               if (strncasecmp(m_subject, "Re:", 3)) wprintf("Re:%20");
-                               urlescputs(m_subject);
-                       }
-                       wprintf("\"><span>[</span>%s<span>]</span></a> ", _("ReplyAll"));
-               }
-
-               /** Forward */
-               if (WC->wc_view == VIEW_MAILBOX) {
-                       wprintf("<a href=\"display_enter?fwdquote=%ld?subject=", msgnum);
-                       if (strncasecmp(m_subject, "Fwd:", 4)) wprintf("Fwd:%20");
-                       urlescputs(m_subject);
-                       wprintf("\"><span>[</span>%s<span>]</span></a> ", _("Forward"));
-               }
-
-               /** If this is one of my own rooms, or if I'm an Aide or Room Aide, I can move/delete */
-               if ( (WC->is_room_aide) || (WC->is_mailbox) || (WC->room_flags2 & QR2_COLLABDEL) ) {
-                       /** Move */
-                       wprintf("<a href=\"confirm_move_msg?msgid=%ld\"><span>[</span>%s<span>]</span></a> ",
-                               msgnum, _("Move"));
-       
-                       /** Delete */
-                       wprintf("<a href=\"delete_msg?msgid=%ld\" "
-                               "onClick=\"return confirm('%s');\">"
-                               "<span>[</span>%s<span>]</span> "
-                               "</a> ", msgnum, _("Delete this message?"), _("Delete")
-                       );
-               }
-
-               /** Headers */
-               wprintf("<a href=\"#\" onClick=\"window.open('msgheaders/%ld', 'headers%ld', 'toolbar=no,location=no,directories=no,copyhistory=no,status=yes,scrollbars=yes,resizable=yes,width=600,height=400'); \" >"
-                       "<span>[</span>%s<span>]</span></a>", msgnum, msgnum, _("Headers"));
-
-
-               /** Print */
-               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'); \" >"
-                       "<span>[</span>%s<span>]</span></a>", msgnum, msgnum, _("Print"));
-
-               wprintf("</p>");
-
-       }
-
        /** begin message header table */
        wprintf("<div class=\"message_header\">");
 
-
-
        strcpy(m_subject, "");
        strcpy(m_cc, "");
 
@@ -1003,27 +913,116 @@ void read_message(long msgnum, int printable_view, char *section) {
                wprintf("****");
        }
 
-       wprintf("</div>");
-
 #ifdef HAVE_ICONV
        utf8ify_rfc822_string(m_cc);
        utf8ify_rfc822_string(m_subject);
 #endif
+
+        /** start msg buttons */
+
+        if (!printable_view) {
+                wprintf("<p id=\"msg%ld\" class=\"msgbuttons\" >\n",msgnum);
+
+               /** Reply */
+               if ( (WC->wc_view == VIEW_MAILBOX) || (WC->wc_view == VIEW_BBS) ) {
+                       wprintf("<a href=\"display_enter");
+                       if (WC->is_mailbox) {
+                               wprintf("?replyquote=%ld", msgnum);
+                       }
+                       wprintf("?recp=");
+                       urlescputs(reply_to);
+                       if (!IsEmptyStr(m_subject)) {
+                               wprintf("?subject=");
+                               if (strncasecmp(m_subject, "Re:", 3)) wprintf("Re:%20");
+                               urlescputs(m_subject);
+                       }
+                       wprintf("\"><span>[</span>%s<span>]</span></a> ", _("Reply"));
+               }
+
+               /** ReplyQuoted */
+               if ( (WC->wc_view == VIEW_MAILBOX) || (WC->wc_view == VIEW_BBS) ) {
+                       if (!WC->is_mailbox) {
+                               wprintf("<a href=\"display_enter");
+                               wprintf("?replyquote=%ld", msgnum);
+                               wprintf("?recp=");
+                               urlescputs(reply_to);
+                               if (!IsEmptyStr(m_subject)) {
+                                       wprintf("?subject=");
+                                       if (strncasecmp(m_subject, "Re:", 3)) wprintf("Re:%20");
+                                       urlescputs(m_subject);
+                               }
+                               wprintf("\"><span>[</span>%s<span>]</span></a> ", _("ReplyQuoted"));
+                       }
+               }
+
+               /** ReplyAll */
+               if (WC->wc_view == VIEW_MAILBOX) {
+                       wprintf("<a href=\"display_enter");
+                       wprintf("?replyquote=%ld", msgnum);
+                       wprintf("?recp=");
+                       urlescputs(reply_to);
+                       wprintf("?cc=");
+                       urlescputs(reply_all);
+                       if (!IsEmptyStr(m_subject)) {
+                               wprintf("?subject=");
+                               if (strncasecmp(m_subject, "Re:", 3)) wprintf("Re:%20");
+                               urlescputs(m_subject);
+                       }
+                       wprintf("\"><span>[</span>%s<span>]</span></a> ", _("ReplyAll"));
+               }
+
+               /** Forward */
+               if (WC->wc_view == VIEW_MAILBOX) {
+                       wprintf("<a href=\"display_enter?fwdquote=%ld?subject=", msgnum);
+                       if (strncasecmp(m_subject, "Fwd:", 4)) wprintf("Fwd:%20");
+                       urlescputs(m_subject);
+                       wprintf("\"><span>[</span>%s<span>]</span></a> ", _("Forward"));
+               }
+
+               /** If this is one of my own rooms, or if I'm an Aide or Room Aide, I can move/delete */
+               if ( (WC->is_room_aide) || (WC->is_mailbox) || (WC->room_flags2 & QR2_COLLABDEL) ) {
+                       /** Move */
+                       wprintf("<a href=\"confirm_move_msg?msgid=%ld\"><span>[</span>%s<span>]</span></a> ",
+                               msgnum, _("Move"));
+       
+                       /** Delete */
+                       wprintf("<a href=\"delete_msg?msgid=%ld\" "
+                               "onClick=\"return confirm('%s');\">"
+                               "<span>[</span>%s<span>]</span> "
+                               "</a> ", msgnum, _("Delete this message?"), _("Delete")
+                       );
+               }
+
+               /** Headers */
+               wprintf("<a href=\"#\" onClick=\"window.open('msgheaders/%ld', 'headers%ld', 'toolbar=no,location=no,directories=no,copyhistory=no,status=yes,scrollbars=yes,resizable=yes,width=600,height=400'); \" >"
+                       "<span>[</span>%s<span>]</span></a>", msgnum, msgnum, _("Headers"));
+
+
+               /** Print */
+               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'); \" >"
+                       "<span>[</span>%s<span>]</span></a>", msgnum, msgnum, _("Print"));
+
+               wprintf("</p>");
+
+       }
+
        if (!IsEmptyStr(m_cc)) {
-               wprintf("<div class=\"message_subject\">");
+               wprintf("<p>");
                wprintf(_("CC:"));
                wprintf(" ");
                escputs(m_cc);
-               wprintf("</div>");
+               wprintf("</p>");
        }
        if (!IsEmptyStr(m_subject)) {
-               wprintf("<div class=\"message_subject\">");
+               wprintf("<p class=\"message_subject\">");
                wprintf(_("Subject:"));
                wprintf(" ");
                escputs(m_subject);
-               wprintf("</div>");
+               wprintf("</p>");
        }
 
+       wprintf("</div>");
+
        /** Begin body */
        wprintf("<div class=\"message_content\">");
 
index a041bc7942dd96b7d51cf3667e197fbe6a0b7271..3e422f2228383b7fcba173d0eca1f6b51b68ae4b 100644 (file)
@@ -433,24 +433,17 @@ a:hover {
         text-align: left;
 }
 
-.message_header span {
-       display: compact;
-        white-space: nowrap;
-}
-
-.message_header, .message_subject {
+.message_header, .message_header p {
        font-size: 10pt;
        color: black;
        margin: 0;
-       padding: 3px;
+       padding: 0;
        background-color: #CCCCCC;
         text-align: left;
 }
 
-.message_subject {
-       padding-top: 0;
+.message_header .message_subject {
        font-style: italic;
-       float: left;
 }
 
 .msgbuttons {
@@ -463,15 +456,14 @@ a:hover {
 
 #delbutton, .msgbuttons a {
         font-size: 7pt;
-        margin: 1px;
+        margin-left: 5px;
+       margin-right: 5px;
         padding: 2px;
-        padding-left: 5px;
-        padding-right: 5px;
         border-top: 1px solid #CFCFCF;
         border-left: 1px solid #CFCFCF;
         border-right: 1px solid #808080;
         border-bottom: 1px solid #000000;
-        background-color: #999999;
+        background-color: #BBBBBB;
         color: #000000;
         font-weight: bold;
         text-align: center;