* Address book "single card" view now suppresses "reading nn message" and
authorArt Cancro <ajc@citadel.org>
Wed, 20 Aug 2003 03:07:25 +0000 (03:07 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 20 Aug 2003 03:07:25 +0000 (03:07 +0000)
  instead shows the letter indices across the top
* Clicking on an address in a vCard now connects to WebCit mail instead
  of a browser mailto: link

webcit/ChangeLog
webcit/messages.c

index fc2bbb8ea12b2594e3dca36716cf53bf906cb2de..ab2ed33e4de0cf254c8ca591b8cbfab12e4cf4d9 100644 (file)
@@ -1,4 +1,10 @@
 $Log$
+Revision 500.19  2003/08/20 03:07:25  ajc
+* Address book "single card" view now suppresses "reading nn message" and
+  instead shows the letter indices across the top
+* Clicking on an address in a vCard now connects to WebCit mail instead
+  of a browser mailto: link
+
 Revision 500.18  2003/08/19 04:18:43  ajc
 * Changed things around in the address book view.  Made it sorted and
   more clickable and better looking...
@@ -1558,3 +1564,4 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
+
index c90b1f9d5d8db95b28577d8b63d02e2c40523c88..5d5785d15d8b3a248b6d3a49416df104b7b6a18a 100644 (file)
@@ -146,7 +146,9 @@ void display_parsed_vcard(struct vCard *v, int full) {
                }
                else if (!strcasecmp(v->prop[i].name, "email;internet")) {
                        wprintf("<TR><TD>Internet e-mail:</TD>"
-                               "<TD><A HREF=\"mailto:");
+                               "<TD>"
+                               "<A HREF=\"/display_enter"
+                               "?force_room=_MAIL_&recp=");
                        urlescputs(v->prop[i].value);
                        wprintf("\">");
                        escputs(v->prop[i].value);
@@ -794,8 +796,9 @@ void do_addrbook_view(struct addrbookent *addrbook, int num_ab) {
                }
 
                wprintf("<TD>");
-               wprintf("<A HREF=\"/readfwd?startmsg=%ld", addrbook[i].ab_msgnum);
-               wprintf("&maxmsgs=1&summary=0\">");
+               wprintf("<A HREF=\"/readfwd?startmsg=%ld&is_singlecard=1",
+                       addrbook[i].ab_msgnum);
+               wprintf("&maxmsgs=1&summary=0&alpha=%s\">", bstr("alpha"));
                escputs(addrbook[i].ab_name);
                wprintf("</A></TD>\n");
        }
@@ -843,6 +846,7 @@ void readloop(char *oper)
        int num_displayed = 0;
        int is_summary = 0;
        int is_addressbook = 0;
+       int is_singlecard = 0;
        int is_calendar = 0;
        int is_tasks = 0;
        int remaining_messages;
@@ -879,10 +883,17 @@ void readloop(char *oper)
                strcpy(cmd, "MSGS ALL");
                maxmsgs = 32767;
        }
+
        if ((WC->wc_view == 2) && (maxmsgs > 1)) {
                is_addressbook = 1;
                strcpy(cmd, "MSGS ALL");
                maxmsgs = 32767;
+       }
+
+       is_singlecard = atoi(bstr("is_singlecard"));
+
+       /* Display the letter indices across the top */
+       if ((is_addressbook) || (is_singlecard)) {
                if (strlen(bstr("alpha")) == 0) {
                        alpha = 'a';
                }
@@ -891,19 +902,27 @@ void readloop(char *oper)
                        alpha = buf[0];
                }
 
-               for (i='a'; i<='z'; ++i) {
-                       if (i == alpha) wprintf("<FONT SIZE=+2>"
-                                               "%c</FONT>\n", toupper(i));
+               for (i='1'; i<='z'; ++i) if ((i=='1')||(islower(i))) {
+                       if ((i != alpha) || (is_singlecard)) {
+                               wprintf("<A HREF=\"/readfwd?alpha=%c\">", i);
+                       }
+                       if (i == alpha) wprintf("<FONT SIZE=+2>");
+                       if (isalpha(i)) {
+                               wprintf("%c", toupper(i));
+                       }
                        else {
-                               wprintf("<A HREF=\"/readfwd?alpha=%c\">"
-                                       "%c</A>\n", i, toupper(i));
+                               wprintf("(other)");
+                       }
+                       if (i == alpha) wprintf("</FONT>");
+                       if ((i != alpha) || (is_singlecard)) {
+                               wprintf("</A>\n");
                        }
                        wprintf("&nbsp;");
                }
-               if (!isalpha(alpha)) wprintf("<FONT SIZE=+2>(other)</FONT>\n");
-               else wprintf("<A HREF=\"/readfwd?alpha=1\">(other)</A>\n");
+
                wprintf("<HR width=100%%>\n");
        }
+
        if (WC->wc_view == 3) {         /* calendar */
                is_calendar = 1;
                strcpy(cmd, "MSGS ALL");
@@ -1030,7 +1049,7 @@ void readloop(char *oper)
 
        /* If we're only looking at one message, do a prev/next thing */
        if (num_displayed == 1) {
-          if ((!is_tasks) && (!is_calendar) && (!is_addressbook)) {
+          if ((!is_tasks) && (!is_calendar) && (!is_addressbook) && (!is_singlecard)) {
 
                wprintf("<CENTER>"
                        "<TABLE BORDER=0 WIDTH=100%% BGCOLOR=\"#DDDDDD\"><TR><TD>"
@@ -1080,7 +1099,7 @@ void readloop(char *oper)
         * messages, then display the selector bar
         */
        if (num_displayed > 1) {
-          if ((!is_tasks) && (!is_calendar) && (!is_addressbook)) {
+          if ((!is_tasks) && (!is_calendar) && (!is_addressbook) && (!is_singlecard)) {
                wprintf("<CENTER>"
                        "<TABLE BORDER=0 WIDTH=100%% BGCOLOR=\"#DDDDDD\"><TR><TD>"
                        "Reading #%d-%d of %d messages.</TD>\n"