X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Faddressbook_popup.c;h=a9bf01a4b8b339afacae43487f95ff9a9702fd2c;hb=a3ba94ad306d781296c53012f732f3a910015263;hp=add472740648e933217b80e77bf556c94c851f13;hpb=d8abfc1ab880919a13cfc012427eab7ee0363334;p=citadel.git diff --git a/webcit/addressbook_popup.c b/webcit/addressbook_popup.c index add472740..a9bf01a4b 100644 --- a/webcit/addressbook_popup.c +++ b/webcit/addressbook_popup.c @@ -1,56 +1,61 @@ /* * $Id$ * - * \defgroup AjaxAutoCompletion ajax-powered autocompletion... - * \ingroup ClientPower + * AJAX-powered auto-completion */ -/*@{*/ #include "webcit.h" -/** - * \brief Call this right before wDumpContent() on any page which requires the address book popup +/* + * Call this right before wDumpContent() on any page which requires the address book popup */ void address_book_popup(void) { /* Open a new div, hidden initially, for address book popups. */ - wprintf("\n"); /* End of 'content' div */ - wprintf("
"); - wprintf("
"); - wprintf("
"); - wprintf("
"); - wprintf("
"); + wc_printf("
\n"); /* End of 'content' div */ + wc_printf("
"); + wc_printf("
"); + wc_printf("
"); + wc_printf("
"); + wc_printf("
"); /* The 'address_book_popup' div will be closed by wDumpContent() */ } -/** - * \brief Address book popup window +/* + * Address book popup window */ void display_address_book_middle_div(void) { char buf[256]; long len; - char *Name, *Namee; + char *Name; + const char *VCName; + void *Namee; + StrBuf *DefAddrBook; HashList *List; HashPos *it; begin_ajax_response(); - wprintf(""); - wprintf(""); - wprintf("
"); + DefAddrBook = get_room_pref("defaddrbook"); - wprintf("
" + wc_printf(""); + wc_printf(""); + wc_printf(""); - wprintf("
"); + + wc_printf("" ""); + wc_printf(""); - wprintf(""); + wc_printf(""); - wprintf("
"); + wc_printf("
"); - wprintf("\n", + wc_printf("", bstr("target_input") ); @@ -91,8 +97,8 @@ void display_address_book_middle_div(void) { -/** - * \brief Address book popup results +/* + * Address book popup results */ void display_address_book_inner_div() { char buf[256]; @@ -100,16 +106,18 @@ void display_address_book_inner_div() { char target_id[64]; char target_label[64]; long len; - char *Name, *Namee; + char *Name; + const char *VCName; + void *Namee; HashList *List; HashPos *it; int i; - char saved_roomname[128]; + StrBuf *saved_roomname; begin_ajax_response(); - List = NewHash(); - wprintf("
" + List = NewHash(1, NULL); + wc_printf("
" "\n"); + wc_printf("\n"); - wprintf("%s: ", _("Add")); + wc_printf("%s: ", _("Add")); num_targets = num_tokens(bstr("target_input"), '|'); for (i=0; i", target_id); + wc_printf("", target_id); } /* This 'close window' button works. Omitting it because we already have a close button * in the upper right corner, and this one takes up space. * - wprintf(""); + wc_printf(""); */ - wprintf("
\n"); + wc_printf("
\n"); end_ajax_response(); } -/** @} */ + + +void +InitModule_ADDRBOOK_POPUP +(void) +{ + WebcitAddUrlHandler(HKEY("display_address_book_middle_div"), "", 0, display_address_book_middle_div, 0); + WebcitAddUrlHandler(HKEY("display_address_book_inner_div"), "", 0, display_address_book_inner_div, 0); +}