]> code.citadel.org Git - citadel.git/blobdiff - webcit/messages.c
* Corrected overly-escaped reply-to addresses in "reply" button
[citadel.git] / webcit / messages.c
index 64e3f1d8eb04567c283bf026b10ded2b53d09b13..ffe4a20f65d84f4895480b223cb6dfdb3b2f33d7 100644 (file)
@@ -514,7 +514,7 @@ void read_message(long msgnum) {
        wprintf("<INPUT TYPE=\"hidden\" NAME=\"msgid\" VALUE=\"%ld\">\n",
                msgnum);
        wprintf("<INPUT TYPE=\"hidden\" NAME=\"recp\" VALUE=\"");
-       urlescputs(reply_to);
+       escputs(reply_to);
        wprintf("\">\n");
 
        if (!strncasecmp(m_subject, "Re:", 2)) {
@@ -528,15 +528,11 @@ void read_message(long msgnum) {
                wprintf("\">\n");
        }
 
-       wprintf("<INPUT TYPE=\"image\" NAME=\"msg_oper\" "
-               "SRC=\"static/reply.gif\" VALUE=\"Reply\">\n");
+       wprintf("<INPUT TYPE=\"submit\" NAME=\"msg_oper\" STYLE=\"font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; font-size: 7pt; background: blue; color: #FFFFFF;\" VALUE=\"Reply\">\n");
 
        if (WC->is_room_aide)  {
-               wprintf("<INPUT TYPE=\"image\" NAME=\"msg_oper\" "
-                       "SRC=\"static/move.gif\" VALUE=\"Move\">\n");
-       
-               wprintf("<INPUT TYPE=\"image\" NAME=\"msg_oper\" "
-                       "SRC=\"static/delete.gif\" VALUE=\"Delete\" "
+               wprintf("<INPUT TYPE=\"submit\" NAME=\"msg_oper\" STYLE=\"font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; font-size: 7pt; background: blue; color: #FFFFFF;\"VALUE=\"Move\">\n"
+                       "<INPUT TYPE=\"submit\" NAME=\"msg_oper\" STYLE=\"font-family: Bitstream Vera Sans,Arial,Helvetica,sans-serif; font-size: 7pt; background: blue; color: #FFFFFF;\" VALUE=\"Delete\""
                        "onClick=\"return confirm('Delete this message?');\">\n");
        }
 
@@ -1036,6 +1032,7 @@ void readloop(char *oper)
        int is_singlecard = 0;
        int is_calendar = 0;
        int is_tasks = 0;
+       int is_notes = 0;
        int remaining_messages;
        int lo, hi;
        int lowest_displayed = (-1);
@@ -1107,11 +1104,16 @@ void readloop(char *oper)
                strcpy(cmd, "MSGS ALL");
                maxmsgs = 32767;
        }
+       if (WC->wc_view == VIEW_NOTES) {                /* notes */
+               is_notes = 1;
+               strcpy(cmd, "MSGS ALL");
+               maxmsgs = 32767;
+       }
 
        nummsgs = load_msg_ptrs(cmd);
        if (nummsgs == 0) {
 
-               if ((!is_tasks) && (!is_calendar)) {
+               if ((!is_tasks) && (!is_calendar) && (!is_notes)) {
                        if (!strcmp(oper, "readnew")) {
                                wprintf("<EM>No new messages.</EM>\n");
                        } else if (!strcmp(oper, "readold")) {
@@ -1192,6 +1194,9 @@ void readloop(char *oper)
                        else if (is_tasks) {
                                display_task(WC->msgarr[a]);
                        }
+                       else if (is_notes) {
+                               display_note(WC->msgarr[a]);
+                       }
                        else {
                                read_message(WC->msgarr[a]);
                        }
@@ -1221,7 +1226,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) && (!is_singlecard)) {
+          if ((!is_tasks) && (!is_calendar) && (!is_addressbook) && (!is_notes) && (!is_singlecard)) {
 
                wprintf("<CENTER>"
                        "<TABLE BORDER=0 WIDTH=100%% BGCOLOR=\"#DDDDDD\"><TR><TD>"
@@ -1270,7 +1275,7 @@ void readloop(char *oper)
         * messages, then display the selector bar
         */
        if (num_displayed > 1) {
-          if ((!is_tasks) && (!is_calendar) && (!is_addressbook) && (!is_singlecard)) {
+          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"
@@ -1509,7 +1514,7 @@ void display_enter(void)
        struct wc_attachment *att;
 
        if (strlen(bstr("force_room")) > 0) {
-               gotoroom(bstr("force_room"), 0);
+               gotoroom(bstr("force_room"));
        }
 
        /* Are we perhaps in an address book view?  If so, then an "enter
@@ -1520,6 +1525,7 @@ void display_enter(void)
                return;
        }
 
+#ifdef WEBCIT_WITH_CALENDAR_SERVICE
        /* Are we perhaps in a calendar view?  If so, then an "enter
         * message" command really means "add new calendar item."
         */
@@ -1535,6 +1541,7 @@ void display_enter(void)
                display_edit_task();
                return;
        }
+#endif
 
        /* Otherwise proceed normally */
        output_headers(1);