]> code.citadel.org Git - citadel.git/blobdiff - webcit/messages.c
* fix issues with room list in firefox 2 (didn't detect console.log properly, again)
[citadel.git] / webcit / messages.c
index 413f9d668d27fd8509baa52ac4d538552948ccb0..2422629450667ac32b4b4c1e65d124d8f4f1b296 100644 (file)
@@ -454,7 +454,7 @@ int load_msg_ptrs(char *servcmd, int with_headers)
                                Msg->subj = NewStrBufPlain(NULL, StrLength(Buf));
                                StrBufExtract_token(Buf2,  Buf, 5, '|');
                                if (StrLength(Buf2) == 0)
-                                       StrBufAppendBufPlain(Msg->subj, _("(no subj)"), -1,0);
+                                       StrBufAppendBufPlain(Msg->subj, _("(no subject)"), -1,0);
                                else {
                                        StrBuf_RFC822_to_Utf8(Msg->subj, Buf2, WCC->DefaultCharset, FoundCharset);
                                        if ((StrLength(Msg->subj) > 75) && 
@@ -656,6 +656,12 @@ void readloop(long oper)
        if (havebstr("is_summary") && (1 == (ibstr("is_summary"))))
                WCC->wc_view = VIEW_MAILBOX;
 
+       if (!WCC->is_ajax) {
+       output_headers(1, 1, 1, 0, 0, 0);
+       } else if (WCC->wc_view == VIEW_MAILBOX) {
+         jsonMessageListHdr();
+       }
+
        switch (WCC->wc_view) {
        case VIEW_WIKI:
                sprintf(buf, "wiki?room=%s&page=home", ChrPtr(WCC->wc_roomname));
@@ -731,15 +737,11 @@ void readloop(long oper)
                }
                
        }
-       if (!WCC->is_ajax) {
-       output_headers(1, 1, 1, 0, 0, 0);
-       } else if (WCC->wc_view == VIEW_MAILBOX) {
-         jsonMessageListHdr();
-       }
+
        nummsgs = load_msg_ptrs(cmd, with_headers);
        if (nummsgs == 0) {
                if (care_for_empty_list) {
-                       wprintf("<div align=\"center\"><br /><em>");
+                       wprintf("<div class=\"nomsgs\"><br><em>");
                        switch (oper) {
                        case readnew:
                                wprintf(_("No new messages."));
@@ -750,7 +752,7 @@ void readloop(long oper)
                        default:
                                wprintf(_("No messages here."));
                        }
-                       wprintf("</em><br /></div>\n");
+                       wprintf("</em><br></div>\n");
                        goto DONE;
                }
 
@@ -922,7 +924,6 @@ DONE:
        /** Note: wDumpContent() will output one additional </div> tag. */
        if (WCC->wc_view != VIEW_MAILBOX) {
                /* We ought to move this out into template */
-               wprintf("</div>\n");            /** end of 'content' div */
                wDumpContent(1);
        } else {
                end_burst();
@@ -1645,7 +1646,6 @@ void jsonMessageListHdr(void)
 }
 /* Spit out the new summary view. This is basically a static page, so clients can cache the layout, all the dirty work is javascript :) */
 void new_summary_view(void) {
-  output_headers(1,1,1,0,0,1);
   begin_burst();
   DoTemplate(HKEY("msg_listview"),NULL,&NoCtx);
   DoTemplate(HKEY("trailing"),NULL,&NoCtx);