From 3a36f729e29480664395d86bc72f941ce0b49c14 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 23 Apr 2007 14:56:13 +0000 Subject: [PATCH] A single address book popup now supports multiple targets (such as To: Cc: Bcc:). Thanks to Ben for the idea. --- webcit/addressbook_popup.c | 24 ++++++++++++++++++++---- webcit/messages.c | 33 ++++++++++----------------------- webcit/static/wclib.js | 2 +- 3 files changed, 31 insertions(+), 28 deletions(-) diff --git a/webcit/addressbook_popup.c b/webcit/addressbook_popup.c index 43f12032a..2b3cd7f38 100644 --- a/webcit/addressbook_popup.c +++ b/webcit/addressbook_popup.c @@ -1,6 +1,6 @@ /* - * $Id: $ - *//** + * $Id$ + * * \defgroup AjaxAutoCompletion ajax-powered autocompletion... * \ingroup ClientPower */ @@ -83,6 +83,10 @@ void display_address_book_middle_div(void) { void display_address_book_inner_div() { char buf[256]; char username[256]; + int num_targets = 0; + char target_id[64]; + char target_label[64]; + int i; begin_ajax_response(); @@ -118,10 +122,22 @@ void display_address_book_inner_div() { wprintf("\n"); - wprintf("", bstr("target_input")); + wprintf("%s: ", _("Add")); + + num_targets = num_tokens(bstr("target_input"), '|'); + for (i=0; i", 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(""); + */ wprintf("\n"); diff --git a/webcit/messages.c b/webcit/messages.c index db930c723..fc380bf55 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -3015,16 +3015,20 @@ void display_enter(void) escputs(bstr("recp")); wprintf("\" size=50 maxlength=1000 />"); wprintf("
"); + wprintf(""); /** Pop open an address book -- begin **/ wprintf( - " " - "" - "", _("Contacts") + "" + "" + " %s", + _("To:"), _("CC:"), _("BCC:"), + _("Contacts"), _("Contacts") ); /** Pop open an address book -- end **/ - wprintf("\n"); + wprintf("\n"); wprintf(""); wprintf(""); @@ -3035,16 +3039,7 @@ void display_enter(void) escputs(bstr("cc")); wprintf("\" size=50 maxlength=1000 />"); wprintf("
"); - - /** Pop open an address book -- begin **/ - wprintf( - " " - "" - "", _("Contacts") - ); - /** Pop open an address book -- end **/ - - wprintf("\n"); + wprintf("\n"); wprintf(""); wprintf(""); @@ -3055,15 +3050,7 @@ void display_enter(void) escputs(bstr("bcc")); wprintf("\" size=50 maxlength=1000 />"); wprintf("
"); - - /** Pop open an address book -- begin **/ - wprintf( - " " - "" - "", _("Contacts") - ); - /** Pop open an address book -- end **/ - wprintf("\n"); + wprintf("\n"); /** Initialize the autocomplete ajax helpers (found in wclib.js) */ wprintf("