From: Thierry Pasqualier Date: Wed, 18 Jul 2007 21:22:42 +0000 (+0000) Subject: Some important changes in iconbar X-Git-Tag: v7.86~3225 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=92975e3ce0bb6842aab40e0620ff7dcc4a3a22bc Some important changes in iconbar - Added a button to select or not the list of the users online You can choise : Yes (for only Who is online ? icon) Yes with users list (for display users list, correct the bad english... ) No (for no Who is online? icon) - used radio box with Yes or No in the place of checkbox to use the same way for all choices - removed hardcoded color (altern table) - added a banner to the return message: Your icon bar has been... - CSS/HTML improvements Test it --- diff --git a/webcit/iconbar.c b/webcit/iconbar.c index 15729cfde..00ecb0fa9 100644 --- a/webcit/iconbar.c +++ b/webcit/iconbar.c @@ -246,8 +246,11 @@ void do_iconbar(void) { } wprintf("\n"); - wprintf("\n"); + + if (ib_users > 1) { + wprintf("\n"); + } } if (ib_chat) { @@ -330,12 +333,13 @@ void do_iconbar(void) { wprintf("\n"); - wprintf( - " \n" - ); + if (ib_users > 1) { + wprintf( + " \n" + ); + } } @@ -481,24 +485,21 @@ void display_customize_iconbar(void) { } output_headers(1, 1, 2, 0, 0, 0); - wprintf("
\n" - "
" - ""); + wprintf("
\n"); + wprintf("

"); wprintf(_("Customize the icon bar")); - wprintf("" - "

\n" - "
\n
\n" - ); + wprintf("
\n"); + wprintf("
\n"); - wprintf("
" - "
"); + wprintf("
"); - wprintf("
\n"); + wprintf("\n"); wprintf("\n", WC->nonce); - wprintf("
"); + wprintf("\n"); + wprintf("
"); wprintf(_("Display icons as:")); - wprintf(" "); + wprintf(""); for (i=0; i<=2; ++i) { wprintf("
\n"); + wprintf("
\n"); wprintf(_("Select the icons you would like to see displayed " "in the 'icon bar' menu on the left side of the " "screen.")); - wprintf("
\n"); - - wprintf("\n"); + wprintf("\n"); - wprintf("\n", - ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), - (ib_logo ? "CHECKED" : ""), + (bar ? "even" : "odd"), + (ib_logo ? "CHECKED" : ""),_("Yes"), + (!ib_logo ? "CHECKED" : ""),_("No"), _("Site logo"), _("An icon describing this site") ); - wprintf("\n", - ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), - (ib_summary ? "CHECKED" : ""), + (bar ? "even" : "odd"), + (ib_summary ? "CHECKED" : ""),_("Yes"), + (!ib_summary ? "CHECKED" : ""),_("No"), _("Summary"), _("Your summary page") ); - wprintf("\n", - ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), - (ib_inbox ? "CHECKED" : ""), + (bar ? "even" : "odd"), + (ib_inbox ? "CHECKED" : ""),_("Yes"), + (!ib_inbox ? "CHECKED" : ""),_("No"), _("Mail (inbox)"), _("A shortcut to your email Inbox") ); - wprintf("\n", - ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), - (ib_contacts ? "CHECKED" : ""), + (bar ? "even" : "odd"), + (ib_contacts ? "CHECKED" : ""),_("Yes"), + (!ib_contacts ? "CHECKED" : ""),_("No"), _("Contacts"), _("Your personal address book") ); - wprintf("\n", - ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), - (ib_notes ? "CHECKED" : ""), + (bar ? "even" : "odd"), + (ib_notes ? "CHECKED" : ""),_("Yes"), + (!ib_notes ? "CHECKED" : ""),_("No"), _("Notes"), _("Your personal notes") ); #ifdef WEBCIT_WITH_CALENDAR_SERVICE - wprintf("\n", - ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), - (ib_calendar ? "CHECKED" : ""), + (bar ? "even" : "odd"), + (ib_calendar ? "CHECKED" : ""),_("Yes"), + (!ib_calendar ? "CHECKED" : ""),_("No"), _("Calendar"), _("A shortcut to your personal calendar") ); - wprintf("\n", - ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), - (ib_tasks ? "CHECKED" : ""), + (bar ? "even" : "odd"), + (ib_tasks ? "CHECKED" : ""),_("Yes"), + (!ib_tasks ? "CHECKED" : ""),_("No"), _("Tasks"), _("A shortcut to your personal task list") ); #endif /* WEBCIT_WITH_CALENDAR_SERVICE */ - wprintf("\n", - ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), - (ib_rooms ? "CHECKED" : ""), + (bar ? "even" : "odd"), + (ib_rooms ? "CHECKED" : ""),_("Yes"), + (!ib_rooms ? "CHECKED" : ""),_("No"), _("Rooms"), _("Clicking this icon displays a list of all accessible " "rooms (or folders) available.") ); - wprintf("\n", - ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), - (ib_users ? "CHECKED" : ""), + (bar ? "even" : "odd"), + (ib_users ? "CHECKED" : ""),_("Yes"), + (!ib_users ? "CHECKED" : ""),_("No"), + ((ib_users > 1) ? "CHECKED" : ""),_("Yes with users list"), _("Who is online?"), _("Clicking this icon displays a list of all users " "currently logged in.") ); - wprintf("\n", - ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), - (ib_chat ? "CHECKED" : ""), + (bar ? "even" : "odd"), + (ib_chat ? "CHECKED" : ""),_("Yes"), + (!ib_chat ? "CHECKED" : ""),_("No"), _("Chat"), _("Clicking this icon enters real-time chat mode " "with other users in the same room.") ); - wprintf("\n", - ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), - (ib_advanced ? "CHECKED" : ""), + (bar ? "even" : "odd"), + (ib_advanced ? "CHECKED" : ""),_("Yes"), + (!ib_advanced ? "CHECKED" : ""),_("No"), _("Advanced options"), _("Access to the complete menu of Citadel functions.") ); - wprintf("\n", - ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")), - (ib_citadel ? "CHECKED" : ""), + (bar ? "even" : "odd"), + (ib_citadel ? "CHECKED" : ""),_("Yes"), + (!ib_citadel ? "CHECKED" : ""),_("No"), _("Citadel logo"), _("Displays the 'Powered by Citadel' icon") ); wprintf("
" - "" + bar = 1 - bar; + wprintf("
" + " %s    " + " %s
" "
" - "\" \"" + "\" \"" "" "%s
" "%s" "
" - "" + bar = 1 - bar; + wprintf("
" + " %s    " + " %s
" "
" - "\" \"" + "\" \"" "" "%s
" "%s" "
" - "" + bar = 1 - bar; + wprintf("
" + " %s    " + " %s
" "
" - "\" \"" + "\" \"" "" "%s
" "%s" "
" - "" + bar = 1 - bar; + wprintf("
" + " %s    " + " %s
" "
" - "\" \"" + "\" \"" "" "%s
" "%s" "
" - "" + bar = 1 - bar; + wprintf("
" + " %s    " + " %s
" "
" - "\" \"" + "\" \"" "" "%s
" "%s" "
" - "" + bar = 1 - bar; + wprintf("
" + " %s    " + " %s
" "
" - "\" \"" + "\" \"" "" "%s
" "%s" "
" - "" + bar = 1 - bar; + wprintf("
" + " %s    " + " %s
" "
" - "\" \"" + "\" \"" "" "%s
" "%s" "
" - "" + bar = 1 - bar; + wprintf("
" + " %s    " + " %s
" "
" - "\" \"" + "\" \"" "" "%s
" "%s" "
" - "" + bar = 1 - bar; + wprintf("
" + " %s    " + " %s
" + " %s" "
" - "\" \"" + "\" \"" "" - "%s
" - "%s" + "%s" + "
%s" "
" - "" + bar = 1 - bar; + wprintf("
" + " %s    " + " %s
" "
" - "\" \"" + "\" \"" "" "%s
" "%s" "
" - "" + bar = 1 - bar; + wprintf("
" + " %s    " + " %s
" "
" - "\" \"" + "\" \"" "" "%s
" "%s" "
" - "" + bar = 1 - bar; + wprintf("
" + " %s    " + " %s
" "
" "\" \"" @@ -703,23 +723,24 @@ void display_customize_iconbar(void) { "%s
" "%s" "

\n" - "
" + "
" "" " " "" - "
\n", + "
\n", _("Save changes"), _("Cancel") ); - wprintf("
\n"); + wprintf("\n"); wDumpContent(2); } @@ -758,6 +779,9 @@ void commit_iconbar(void) { if (!strcasecmp(bstr(boxen[i]), "yes")) { Val = "1"; } + else if (!strcasecmp(bstr(boxen[i]), "yeslist")) { + Val = "2"; + } else { Val = "0"; } @@ -766,7 +790,12 @@ void commit_iconbar(void) { set_preference("iconbar", iconbar, 1); - output_headers(1, 1, 0, 0, 0, 0); + output_headers(1, 1, 2, 0, 0, 0); + wprintf("
\n"); + wprintf("

"); + wprintf(_("Customize the icon bar")); + wprintf("

\n"); + wprintf("
\n"); wprintf( "
" "" diff --git a/webcit/static/webcit.css b/webcit/static/webcit.css index 3e422f222..7fbec05ca 100644 --- a/webcit/static/webcit.css +++ b/webcit/static/webcit.css @@ -845,7 +845,7 @@ div.auto_complete ul strong.highlight { background-color: #CCCCCC; } -.auth_validate, .event_background, .calendar_background, .calendar_view_background, .graphics_background, .iconbar_background, .messages_background, .paging_background, .preferences_background, .roomops_background, .sieve_background { +.auth_validate, .event_background, .calendar_background, .calendar_view_background, .graphics_background, .messages_background, .paging_background, .preferences_background, .roomops_background, .sieve_background { border: 0; width: 100%; background-color: #ffffff; @@ -862,7 +862,7 @@ div.auto_complete ul strong.highlight { background-color: #ffffff; } -.auth_banner, .event_banner, .floors_banner, .calendar_banner, .graphics_banner, .iconbar_banner, .inetconf_banner, .listsub_banner { +.auth_banner, .event_banner, .floors_banner, .calendar_banner, .graphics_banner, .inetconf_banner, .listsub_banner { border: 0; width: 100%; background-color: #444455; @@ -1465,7 +1465,7 @@ div.auto_complete ul strong.highlight { background-color: #CCCCCC; } -.auth_validate, .event_background, .calendar_background, .calendar_view_background, .graphics_background, .iconbar_background, .messages_background, .paging_background, .preferences_background, .roomops_background, .sieve_background { +.auth_validate, .event_background, .calendar_background, .calendar_view_background, .graphics_background, .messages_background, .paging_background, .preferences_background, .roomops_background, .sieve_background { border: 0; width: 100%; background-color: #ffffff; @@ -1482,7 +1482,7 @@ div.auto_complete ul strong.highlight { background-color: #ffffff; } -.auth_banner, .event_banner, .floors_banner, .calendar_banner, .graphics_banner, .iconbar_banner, .inetconf_banner, .listsub_banner { +.auth_banner, .event_banner, .floors_banner, .calendar_banner, .graphics_banner, .inetconf_banner, .listsub_banner { border: 0; width: 100%; background-color: #444455;