From: Wilfried Goesgens Date: Thu, 21 Jul 2011 20:39:36 +0000 (+0000) Subject: fix summary view X-Git-Tag: v8.11~560 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=fb6d573c664ecb062b96be90c59906ed9bbe82ae;p=citadel.git fix summary view - add neccessary stuff to header/trailer to make the page complete - add URL-handlers for the summary page sections for the refreshing - fix tokens and circumvent our singlequote bug once more. --- diff --git a/webcit/static/t/summary/header.html b/webcit/static/t/summary/header.html index 254d0293c..db51e584e 100644 --- a/webcit/static/t/summary/header.html +++ b/webcit/static/t/summary/header.html @@ -1,3 +1,37 @@ + + + + <?CURRENT_ROOM> - <?SERV:HUMANNODE> + + + + + + stylesheet" type="text/css" id="style_iconbar_icns" title="Default iconbar"> + stylesheet" type="text/css" id="style_iconbar_piconly" title="Iconbar without text"> + + + + + + + + + + + + + + + + +
+ + + + + - - - - - - - - - - - -
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
- , - - , - - . - -
-
diff --git a/webcit/static/t/summary/trailer.html b/webcit/static/t/summary/trailer.html index 5a3ac48f5..dfa28fe8e 100644 --- a/webcit/static/t/summary/trailer.html +++ b/webcit/static/t/summary/trailer.html @@ -4,3 +4,10 @@
+ + + + + diff --git a/webcit/summary.c b/webcit/summary.c index 1c37a0f15..6372245a0 100644 --- a/webcit/summary.c +++ b/webcit/summary.c @@ -54,7 +54,7 @@ void tmplput_output_date(StrBuf *Target, WCTemplputParams *TP) /* * New messages section */ -void new_messages_section(StrBuf *Target, WCTemplputParams *TP) { +void new_messages_section(void) { char buf[SIZ]; char room[SIZ]; int i; @@ -91,7 +91,7 @@ void new_messages_section(StrBuf *Target, WCTemplputParams *TP) { /* * Task list section */ -void tasks_section(StrBuf *Target, WCTemplputParams *TP) { +void tasks_section(void) { int num_msgs = 0; HashPos *at; const char *HashKey; @@ -138,7 +138,7 @@ void tasks_section(StrBuf *Target, WCTemplputParams *TP) { /* * Calendar section */ -void calendar_section(StrBuf *Target, WCTemplputParams *TP) { +void calendar_section(void) { char cmd[SIZ]; int num_msgs = 0; HashPos *at; @@ -187,13 +187,29 @@ void calendar_section(StrBuf *Target, WCTemplputParams *TP) { __calendar_Cleanup(&v); } +void tmplput_new_messages_section(StrBuf *Target, WCTemplputParams *TP) { + new_messages_section(); +} +void tmplput_tasks_section(StrBuf *Target, WCTemplputParams *TP) { + tasks_section(); +} +void tmplput_calendar_section(StrBuf *Target, WCTemplputParams *TP) { + calendar_section(); +} + void InitModule_SUMMARY (void) { RegisterNamespace("TIME:NOW", 0, 0, tmplput_output_date, NULL, CTX_NONE); - RegisterNamespace("SUMMARY:NEWMESSAGES_SELECTION", 0, 0, new_messages_section, NULL, CTX_NONE); - RegisterNamespace("SUMMARY:TASKSSECTION", 0, 0, tasks_section, NULL, CTX_NONE); - RegisterNamespace("SUMMARY:CALENDAR_SECTION", 0, 0, calendar_section, NULL, CTX_NONE); + RegisterNamespace("SUMMARY:NEWMESSAGES_SELECTION", 0, 0, tmplput_new_messages_section, NULL, CTX_NONE); + RegisterNamespace("SUMMARY:TASKSSECTION", 0, 0, tmplput_tasks_section, NULL, CTX_NONE); + RegisterNamespace("SUMMARY:CALENDAR_SECTION", 0, 0, tmplput_calendar_section, NULL, CTX_NONE); + + WebcitAddUrlHandler(HKEY("new_messages_html"), "", 0, new_messages_section, AJAX); + WebcitAddUrlHandler(HKEY("tasks_inner_html"), "", 0, tasks_section, AJAX); + WebcitAddUrlHandler(HKEY("calendar_inner_html"), "", 0, calendar_section, AJAX); + WebcitAddUrlHandler(HKEY("mini_calendar"), "", 0, ajax_mini_calendar, AJAX); + }