From fa016a0b9e93e5b1a3556df520bc50359fbcfc1e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Tue, 11 Nov 2008 00:17:35 +0000 Subject: [PATCH] * render submessages. --- webcit/messages.c | 2 +- webcit/msg_renderers.c | 2 ++ webcit/static/t/view_message.html | 41 ++++++++++++++-------------- webcit/static/t/view_submessage.html | 15 ++++++++++ webcit/webcit.h | 2 +- 5 files changed, 40 insertions(+), 22 deletions(-) create mode 100644 webcit/static/t/view_submessage.html diff --git a/webcit/messages.c b/webcit/messages.c index e82e03379..b67465d68 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -228,7 +228,7 @@ int summcmp_rdate(const void *s1, const void *s2) { * printable_view Nonzero to display a printable view * section Optional for encapsulated message/rfc822 submessage */ -void read_message(StrBuf *Target, const char *tmpl, long tmpllen, long msgnum, int printable_view, char *section) { +void read_message(StrBuf *Target, const char *tmpl, long tmpllen, long msgnum, int printable_view, const char *section) { StrBuf *Buf; StrBuf *Token; StrBuf *FoundCharset; diff --git a/webcit/msg_renderers.c b/webcit/msg_renderers.c index ca9b264fd..ec3cf9632 100644 --- a/webcit/msg_renderers.c +++ b/webcit/msg_renderers.c @@ -267,6 +267,8 @@ void tmplput_MAIL_SUMM_DATE_NO(StrBuf *Target, int nArgs, WCTemplateToken *Token void render_MAIL(wc_mime_attachment *Mime, StrBuf *RawData, StrBuf *FoundCharset) { + Mime->Data = NewStrBufPlain(NULL, Mime->length); + read_message(Mime->Data, HKEY("view_submessage"), Mime->msgnum, 0, ChrPtr(Mime->PartNum)); /* if ( (!IsEmptyStr(mime_submessages)) && (!section[0]) ) { for (i=0; i").style.visibility="visible" onMouseOut=document.getElementById("msg").style.visibility="hidden" > -
-
- - - - + + + + +
diff --git a/webcit/static/t/view_submessage.html b/webcit/static/t/view_submessage.html new file mode 100644 index 000000000..dc07d15d5 --- /dev/null +++ b/webcit/static/t/view_submessage.html @@ -0,0 +1,15 @@ +
+
+ + + + *** + +

+
+ +
+ +
+ +
diff --git a/webcit/webcit.h b/webcit/webcit.h index 33fe47e2d..8074087b1 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -783,7 +783,7 @@ void dump_vars(void); void embed_main_menu(void); void serv_read(char *buf, int bytes); void readloop(char *oper); -void read_message(StrBuf *Target, const char *tmpl, long tmpllen, long msgnum, int printable_view, char *section); +void read_message(StrBuf *Target, const char *tmpl, long tmpllen, long msgnum, int printable_view, const char *section); void do_addrbook_view(addrbookent *addrbook, int num_ab); void display_vcard(StrBuf *Target, const char *vcard_source, char alpha, int full, char *storename, long msgnum); void text_to_server(char *ptr); -- 2.39.2