]> code.citadel.org Git - citadel.git/blobdiff - webcit/messages.c
* Started changing some of the top-level tables from 100% width to 99%
[citadel.git] / webcit / messages.c
index ece6f96bf6e817ae50ec96bfd124135b0219109d..4e6d28f991e0ccf99841ef287c61916bd61537fb 100644 (file)
@@ -369,7 +369,7 @@ void read_message(long msgnum) {
        }
 
        /* begin everythingamundo table */
-       wprintf("<table width=100% border=1 cellspacing=0 "
+       wprintf("<center><table width=99%% border=1 cellspacing=0 "
                "cellpadding=0><TR><TD>\n");
 
        /* begin message header table */
@@ -642,7 +642,7 @@ ENDBODY:
        wprintf("</TD></TR></TABLE>\n");
 
        /* end everythingamundo table */
-       wprintf("</TD></TR></TABLE><br />\n");
+       wprintf("</TD></TR></TABLE></center><br />\n");
 }
 
 
@@ -880,8 +880,8 @@ void fetch_ab_name(long msgnum, char *namebuf) {
  */
 int abcmp(const void *ab1, const void *ab2) {
        return(strcasecmp(
-               (((const struct addrbookent *)ab1)->ab_name),
-               (((const struct addrbookent *)ab2)->ab_name)
+               (((const struct addrbookent *)ab1)->ab_name),
+               (((const struct addrbookent *)ab2)->ab_name)
        ));
 }
 
@@ -1135,8 +1135,10 @@ void readloop(char *oper)
                }
        }
 
+       wprintf("<FORM NAME=\"msgomatic\" "
+               "METHOD=\"POST\" ACTION=\"/do_stuff_to_msgs\">\n");
        if (is_summary) {
-               wprintf("<FORM METHOD=\"POST\" ACTION=\"/do_stuff_to_msgs\">\n"
+               wprintf(
                        "<TABLE border=0 cellspacing=0 "
                        "cellpadding=0 width=100%%>\n"
                        "<TR>"
@@ -1266,7 +1268,6 @@ void readloop(char *oper)
                        oper,
                        WC->msgarr[0]);
 
-               wprintf("</TD></TR></TABLE></CENTER>\n");
            }
        }
 
@@ -1275,55 +1276,53 @@ void readloop(char *oper)
         * messages, then display the selector bar
         */
        if (num_displayed > 1) {
-          if ((!is_tasks) && (!is_calendar) && (!is_addressbook) && (!is_notes) && (!is_singlecard)) {
-               wprintf("<CENTER>"
-                       "<TABLE BORDER=0 WIDTH=100%% BGCOLOR=\"#DDDDDD\"><TR><TD>"
-                       "Reading #%d-%d of %d messages.</TD>\n"
-                       "<TD ALIGN=RIGHT><FONT SIZE=+1>",
-                       lowest_displayed, highest_displayed, nummsgs);
+          if ((!is_tasks) && (!is_calendar) && (!is_addressbook)
+             && (!is_notes) && (!is_singlecard)) {
 
-               if (is_summary) {
-                       wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" "
-                               "VALUE=\"Delete selected\">\n");
-               }
+               wprintf("Reading #", lowest_displayed, highest_displayed);
 
+               wprintf("<SELECT NAME=\"whichones\" SIZE=\"1\" "
+                       "OnChange=\"location.href=msgomatic.whichones.options"
+                       "[selectedIndex].value\">\n");
 
                for (b=0; b<nummsgs; b = b + maxmsgs) {
                lo = b+1;
                hi = b+maxmsgs;
                if (hi > nummsgs) hi = nummsgs;
-                       if (WC->msgarr[b] != startmsg) {
-                               wprintf("<A HREF=\"/%s"
-                                       "?startmsg=%ld"
-                                       "&maxmsgs=%d"
-                                       "&summary=%d\">"
-                                       "%d-%d</A> \n",
-                                               oper,
-                                               WC->msgarr[b],
-                                               maxmsgs,
-                                               is_summary,
-                                               lo, hi);
-                       }
-                       else {
-                               wprintf("%d-%d \n", lo, hi);
-                       }
-
+                       wprintf("<OPTION %s VALUE="
+                               "\"/%s"
+                               "?startmsg=%ld"
+                               "&maxmsgs=%d"
+                               "&summary=%d\">"
+                               "%d-%d</OPTION> \n",
+                               ((WC->msgarr[b] == startmsg) ? "SELECTED" : ""),
+                               oper,
+                               WC->msgarr[b],
+                               maxmsgs,
+                               is_summary,
+                               lo, hi);
                }
-               wprintf("<A HREF=\"/%s?startmsg=%ld"
+               wprintf("<OPTION VALUE=\"/%s?startmsg=%ld"
                        "&maxmsgs=999999&summary=%d\">"
                        "ALL"
-                       "</A> ",
+                       "</OPTION> ",
                        oper,
                        WC->msgarr[0], is_summary);
 
-               wprintf("<A HREF=\"/%s?startmsg=%ld"
+               wprintf("<OPTION VALUE=\"/%s?startmsg=%ld"
                        "&maxmsgs=999999&summary=1\">"
                        "Summary"
-                       "</A>",
+                       "</OPTION>",
                        oper,
                        WC->msgarr[0]);
 
-               wprintf("</TD></TR></TABLE></CENTER>\n");
+               wprintf("</SELECT> of %d messages.", nummsgs);
+
+               if (is_summary) {
+                       wprintf("<INPUT TYPE=\"submit\" NAME=\"sc\" "
+                               "VALUE=\"Delete selected\">\n");
+               }
+
            }
        }
        if (is_summary) wprintf("</FORM>\n");