From 3c60c73ac075427b629371849df6afd1ee935906 Mon Sep 17 00:00:00 2001 From: Thierry Pasqualier Date: Sat, 20 Oct 2007 12:13:26 +0000 Subject: [PATCH] updated tabbed dialog API --- webcit/siteconfig.c | 4 ++-- webcit/static/trailing.html | 1 + webcit/static/webcit.css | 14 ++++++++++++-- webcit/tabs.c | 19 +++++++++---------- 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/webcit/siteconfig.c b/webcit/siteconfig.c index d454e44f2..380e06165 100644 --- a/webcit/siteconfig.c +++ b/webcit/siteconfig.c @@ -53,7 +53,7 @@ void display_siteconfig(void) return; } - wprintf("
"); + wprintf("
"); char *tabnames[] = { _("General"), @@ -678,7 +678,7 @@ void display_siteconfig(void) begin_tab(5, 8); client_write(purger, strlen(purger)); end_tab(5, 8); begin_tab(6, 8); client_write(idxjnl, strlen(idxjnl)); end_tab(6, 8); begin_tab(7, 8); client_write(funambol, strlen(funambol)); end_tab(7, 8); - wprintf("

"); + wprintf("
"); wprintf("", _("Save changes")); wprintf(" "); wprintf("\n", _("Cancel")); diff --git a/webcit/static/trailing.html b/webcit/static/trailing.html index 972be136f..8148bfbc3 100644 --- a/webcit/static/trailing.html +++ b/webcit/static/trailing.html @@ -5,6 +5,7 @@ Rounded("div.boxlabel", "big transparent top"); Rounded("li.tablabel", "small transparent top"); Rounded("div.tabcontent", "big transparent bottom"); + Rounded("div.tabcontent_submit", "big transparent bottom");
diff --git a/webcit/static/webcit.css b/webcit/static/webcit.css index b7c631e9b..2a252ad96 100644 --- a/webcit/static/webcit.css +++ b/webcit/static/webcit.css @@ -1087,7 +1087,10 @@ table.advanced { /* Tabs */ -.tab_cell_label, .tab_cell, .tab_cell_edit { + +#TheTabs { + margin: 3% auto 0 auto; + width: 94%; } ul.tabbed_dialog { @@ -1107,12 +1110,19 @@ ul.tabbed_dialog li { } .tabcontent { - margin: 3% auto 0 auto; + margin: 0 auto 0 auto; width: 96%; padding: 10px; clear: both; } +.tabcontent_submit { + margin: 0 auto 0 auto; + width: 50%; + padding: 10px; + text-align: center; +} + /* Calendar view */ .calendar { diff --git a/webcit/tabs.c b/webcit/tabs.c index 72fc34073..2118d8bb1 100644 --- a/webcit/tabs.c +++ b/webcit/tabs.c @@ -22,37 +22,34 @@ void tabbed_dialog(int num_tabs, char *tabnames[]) { " if (which_tab == previously_selected_tab) { " " return; " " } " - " $('tabtd'+previously_selected_tab).style.backgroundColor = '#cccccc'; " " $('tabdiv'+previously_selected_tab).style.display = 'none'; " - " $('tabtd'+which_tab).style.backgroundColor = '#ffffff'; " " $('tabdiv'+which_tab).style.display = 'block'; " " previously_selected_tab = which_tab; " "} " " \n" ); - wprintf("" + wprintf("
" "" ); for (i=0; i" - "", + ">", i, - ( (i==0) ? "ffffff" : "cccccc" ), + ( (i==0) ? "tab_cell_label" : "tab_cell_edit" ), i, i ); wprintf("%s", tabnames[i]); - wprintf(""); + wprintf(""); wprintf("\n"); } wprintf("
  
\n"); - wprintf("
"); + wprintf("
"); } /** @@ -78,9 +75,11 @@ void end_tab(int tabnum, int num_tabs) { wprintf("\n", tabnum, num_tabs); if (tabnum == num_tabs-1) { - wprintf("
\n"); + wprintf("
\n"); wprintf("" ); } -- 2.30.2