X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Faddressbook_popup.c;h=887198f574d24d2a4dc9d51d9672c5b1ece91905;hb=5d38a76f8f06640e3a3f097d584ac52336110f7c;hp=fe4ca703bad10d156f684a03a5c5ae6cdc9457da;hpb=49663514bf74233fa89b9cf1800264c848e174e0;p=citadel.git diff --git a/webcit/addressbook_popup.c b/webcit/addressbook_popup.c index fe4ca703b..887198f57 100644 --- a/webcit/addressbook_popup.c +++ b/webcit/addressbook_popup.c @@ -1,7 +1,15 @@ /* - * $Id$ - * * AJAX-powered auto-completion + * + * Copyright (c) 1996-2012 by the citadel.org team + * + * This program is open source software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License, version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include "webcit.h" @@ -12,12 +20,12 @@ */ 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() */ } @@ -28,25 +36,31 @@ void display_address_book_middle_div(void) { char buf[256]; long len; char *Name; + const char *VCName; void *Namee; + StrBuf *DefAddrBook; HashList *List; HashPos *it; begin_ajax_response(); - wprintf(""); - wprintf(""); - wprintf("
"); + DefAddrBook = get_room_pref("defaddrbook"); + + wc_printf(""); + wc_printf(""); + wc_printf(""); - wprintf("
"); - wprintf("
" + wc_printf("" "
"); + wc_printf(""); - wprintf("
"); + wc_printf(""); - wprintf("
"); + ">"); + wc_printf("
"); - wprintf("\n", + wc_printf("", bstr("target_input") ); @@ -100,16 +115,17 @@ void display_address_book_inner_div() { char target_label[64]; long len; 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(1, NULL); - wprintf("
" + 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); +}