From 82932fb6b663050ba7812555ddfb526a4fbe98b0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Sun, 14 Jun 2009 21:03:05 +0000 Subject: [PATCH] * apply samjams edit drafts patch. Modification: use force_room instead of creating a new solution --- webcit/msg_renderers.c | 14 ++++++++++++++ webcit/static/t/edit_message.html | 19 ++++++++++++------- webcit/static/t/view_message.html | 1 + 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/webcit/msg_renderers.c b/webcit/msg_renderers.c index 1c0840f64..9bdd2b322 100644 --- a/webcit/msg_renderers.c +++ b/webcit/msg_renderers.c @@ -788,6 +788,19 @@ void tmplput_QUOTED_MAIL_BODY(StrBuf *Target, WCTemplputParams *TP) FreeStrBuf(&Buf); } +void tmplput_EDIT_MAIL_BODY(StrBuf *Target, WCTemplputParams *TP) +{ + const StrBuf *Mime; + long MsgNum; + StrBuf *Buf; + + MsgNum = LBstr(TKEY(0)); + Buf = NewStrBuf(); + read_message(Buf, HKEY("view_message_edit"), MsgNum, NULL, &Mime); + StrBufAppendTemplate(Target, TP, Buf, 1); + FreeStrBuf(&Buf); +} + void tmplput_MAIL_BODY(StrBuf *Target, WCTemplputParams *TP) { message_summary *Msg = (message_summary*) CTX; @@ -1170,6 +1183,7 @@ InitModule_MSGRENDERERS RegisterNamespace("MAIL:SUMM:INREPLYTO", 0, 2, tmplput_MAIL_SUMM_INREPLYTO, CTX_MAILSUM); RegisterNamespace("MAIL:BODY", 0, 2, tmplput_MAIL_BODY, CTX_MAILSUM); RegisterNamespace("MAIL:QUOTETEXT", 1, 2, tmplput_QUOTED_MAIL_BODY, CTX_NONE); + RegisterNamespace("MAIL:EDITTEXT", 1, 2, tmplput_EDIT_MAIL_BODY, CTX_NONE); RegisterConditional(HKEY("COND:MAIL:SUMM:RFCA"), 0, Conditional_MAIL_SUMM_RFCA, CTX_MAILSUM); RegisterConditional(HKEY("COND:MAIL:SUMM:CCCC"), 0, Conditional_MAIL_SUMM_CCCC, CTX_MAILSUM); RegisterConditional(HKEY("COND:MAIL:SUMM:UNREAD"), 0, Conditional_MAIL_SUMM_UNREAD, CTX_MAILSUM); diff --git a/webcit/static/t/edit_message.html b/webcit/static/t/edit_message.html index 714c88c96..19b76728c 100644 --- a/webcit/static/t/edit_message.html +++ b/webcit/static/t/edit_message.html @@ -99,13 +99,18 @@ <br /> - - - <br><p>-- <br> - - </p> - - + + + + + + + <br><p>-- <br> + + </p> + + + diff --git a/webcit/static/t/view_message.html b/webcit/static/t/view_message.html index 6c557b9f3..6d3db5d74 100644 --- a/webcit/static/t/view_message.html +++ b/webcit/static/t/view_message.html @@ -15,6 +15,7 @@ onMouseOut=document.getElementById("msg").style.visibility="hidden