From 143b289ff10be417e2fe96664d4754271100d2e7 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 3 Oct 2008 14:38:30 +0000 Subject: [PATCH] Finished the trailing_javascript API and moved a few things to it --- webcit/addressbook_popup.c | 5 ++--- webcit/event.c | 3 +-- webcit/static/t/trailing.html | 1 + webcit/webcit.c | 7 ++++--- webcit/webcit.h | 2 +- webcit/who.c | 3 +++ 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/webcit/addressbook_popup.c b/webcit/addressbook_popup.c index 5609c68ae..b8be3e77a 100644 --- a/webcit/addressbook_popup.c +++ b/webcit/addressbook_popup.c @@ -88,9 +88,8 @@ void display_address_book_middle_div(void) { ">"); wprintf(""); - wprintf("\n", + StrBufAppendPrintf(WC->trailing_javascript, + "PopulateAddressBookInnerDiv($('which_addr_book').value,'%s');", bstr("target_input") ); diff --git a/webcit/event.c b/webcit/event.c index 3bf04f861..54cf9e1cc 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -562,10 +562,9 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, wprintf("\n"); - wprintf(" \n" ); address_book_popup(); wDumpContent(1); diff --git a/webcit/static/t/trailing.html b/webcit/static/t/trailing.html index e69a7c0f2..5d1f0e0ec 100644 --- a/webcit/static/t/trailing.html +++ b/webcit/static/t/trailing.html @@ -1,5 +1,6 @@ \n", - ChrPtr(WC->trailing_javascript)); + svcallback("TRAILING_JAVASCRIPT", put_trailing_javascript); do_template("trailing", NULL); } diff --git a/webcit/webcit.h b/webcit/webcit.h index 3a3e0c333..265e6f025 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -282,7 +282,7 @@ typedef struct _TemplateToken { TemplateParam *Params[MAXPARAM]; } WCTemplateToken; -typedef void (*WCHandlerFunc)(StrBuf *Target, int nArgs, WCTemplateToken *Token, void *Context, int ContextType); +typedef void (*WCHandlerFunc)(); /** diff --git a/webcit/who.c b/webcit/who.c index 02f3630e9..a2ecd9a3c 100644 --- a/webcit/who.c +++ b/webcit/who.c @@ -231,6 +231,7 @@ void who_inner_div(void) { */ +#if 0 /* * Display a list of users currently logged in to the system * / @@ -246,6 +247,7 @@ void who(void) "}\n" "\n", _("Do you really want to kill this session?") ); +#endif wprintf("
\n"); wprintf("
"); @@ -294,6 +296,7 @@ void who(void) wDumpContent(1); } */ +#endif /* * end session -- 2.30.2