]> code.citadel.org Git - citadel.git/blobdiff - webcit/paging.c
* Made all the title boxes the same background color. The old scheme was
[citadel.git] / webcit / paging.c
index b3d4b177765e506cac6f741571d05d77c8813f12..be11aad49e09c982929516f0d49b35581a5e9313 100644 (file)
@@ -158,7 +158,7 @@ void page_popup(void)
 
                extract(pagefrom, &buf[4], 3);
 
-               wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#007700\"><TR><TD>");
+               wprintf("<TABLE WIDTH=100%% BORDER=0 BGCOLOR=\"#444455\"><TR><TD>");
                wprintf("<SPAN CLASS=\"titlebar\">Instant message from ");
                escputs(pagefrom);
                wprintf("</SPAN></TD></TR></TABLE>\n");
@@ -337,20 +337,55 @@ void chat_recv(void) {
                        extract_token(cl_user, buf, 0, '|');
                        extract_token(cl_text, buf, 1, '|');
 
-                       wprintf("parent.chat_transcript.document.write('");
-                       wprintf("<FONT SIZE=-1>");
-                       wprintf("<B>");
-                       if (!strcasecmp(cl_user, WC->wc_username)) {
-                               wprintf("<I>");
-                       }
-                       jsescputs(cl_user);
-                       wprintf(": ");
-                       if (strcasecmp(cl_user, WC->wc_username)) {
-                               wprintf("</B>");
+                       if (strcasecmp(cl_text, "NOOP")) {
+
+                               wprintf("parent.chat_transcript.document.write('");
+       
+                               if (strcasecmp(cl_user, WC->last_chat_user)) {
+                                       wprintf("<TABLE border=0 WIDTH=100%% "
+                                               "CELLSPACING=1 CELLPADDING=0 "
+                                               "BGCOLOR=&quot;#FFFFFF&quot;>"
+                                               "<TR><TD></TR></TD></TABLE>"
+                                       );
+       
+                               }
+
+                               wprintf("<TABLE border=0 WIDTH=100%% "
+                                       "CELLSPACING=0 CELLPADDING=0 "
+                                       "BGCOLOR=&quot;#EEEEEE&quot;>");
+       
+                               wprintf("<TR><TD>");
+       
+                               if (!strcasecmp(cl_user, ":")) {
+                                       wprintf("<I>");
+                               }
+
+                               if (strcasecmp(cl_user, WC->last_chat_user)) {
+                                       wprintf("<B>");
+       
+                                       if (!strcasecmp(cl_user, WC->wc_username)) {
+                                               wprintf("<FONT COLOR=&quot;#FF0000&quot;>");
+                                       }
+                                       else {
+                                               wprintf("<FONT COLOR=&quot;#0000FF&quot;>");
+                                       }
+                                       jsescputs(cl_user);
+       
+                                       wprintf("</FONT>: </B>");
+                               }
+                               else {
+                                       wprintf("&nbsp;&nbsp;&nbsp;");
+                               }
+                               jsescputs(cl_text);
+                               if (!strcasecmp(cl_user, ":")) {
+                                       wprintf("</I>");
+                               }
+
+                               wprintf("</TD></TR></TABLE>");
+                               wprintf("'); \n");
+
+                               strcpy(WC->last_chat_user, cl_user);
                        }
-                       jsescputs(cl_text);
-                       wprintf("</I></B></FONT><BR>");
-                       wprintf("'); \n");
                }
 
                wprintf("parent.chat_transcript.scrollTo(999999,999999);\">\n");