X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Faddressbook_popup.c;h=8b5b97973cafec8c926a642fbc293f6302574546;hb=bb8396949b1fd2c8f96b3d4bc12fd4048b87c6cf;hp=03a1f6277db381684a673d97d974c7ad1009ac77;hpb=a5de3dbe7d1106599728013612c12cd9b007dfdb;p=citadel.git diff --git a/webcit/addressbook_popup.c b/webcit/addressbook_popup.c index 03a1f6277..8b5b97973 100644 --- a/webcit/addressbook_popup.c +++ b/webcit/addressbook_popup.c @@ -1,7 +1,20 @@ /* - * $Id$ - * * AJAX-powered auto-completion + * + * Copyright (c) 1996-2011 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 as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include "webcit.h" @@ -12,12 +25,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 +41,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 +120,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); +}