updated tabbed dialog API
authorThierry Pasqualier <thierry@uncensored.citadel.org>
Sat, 20 Oct 2007 12:13:26 +0000 (12:13 +0000)
committerThierry Pasqualier <thierry@uncensored.citadel.org>
Sat, 20 Oct 2007 12:13:26 +0000 (12:13 +0000)
webcit/siteconfig.c
webcit/static/trailing.html
webcit/static/webcit.css
webcit/tabs.c

index d454e44f25401144e51d8c4e8daf3f93897afff0..380e06165cec2de90d90d02d5ca99d7e8d3dfd27 100644 (file)
@@ -53,7 +53,7 @@ void display_siteconfig(void)
                return;
        }
 
-       wprintf("<table><tr><td>");
+       wprintf("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" ><tr><td>");
 
        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("<div align=\"center\"><br>");
+       wprintf("<div class=\"tabcontent_submit\">");
        wprintf("<input type=\"submit\" NAME=\"ok_button\" VALUE=\"%s\">", _("Save changes"));
        wprintf("&nbsp;");
        wprintf("<input type=\"submit\" NAME=\"cancel_button\" VALUE=\"%s\">\n", _("Cancel"));
index 972be136fce0f1cbd7050e4facb92ce6f30d1877..8148bfbc347a6376a0f7ed173afecedb358f6729 100644 (file)
@@ -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");
 </script>
 </div>
 </body>
index b7c631e9bd643aed929d47ed0c2043d3fdaa1273..2a252ad96624d599003e40b21e9f05562c7eb05f 100644 (file)
@@ -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 {
index 72fc34073c9ab6a584078f1bfd1c62d2bdf4e99f..2118d8bb1c7baa42bbef3fd923dd70068c6ce1ad 100644 (file)
@@ -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;                                    "
                "}                                                                              "
                "</script>                                                                      \n"
        );
 
-       wprintf("<table id=\"TheTabs\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%%\">"
+       wprintf("<table id=\"TheTabs\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
                "<tr align=\"center\" style=\"cursor:pointer\"><td>&nbsp;</td>"
        );
 
        for (i=0; i<num_tabs; ++i) {
-               wprintf("<td id=\"tabtd%d\" bgcolor=\"#%s\" "
+               wprintf("<td id=\"tabtd%d\" class=\"%s\" "
                        "onClick='tabsel(\"%d\");'"
-                       ">"
-                       "<span class=\"tablabel\">",
+                       ">",
                        i,
-                       ( (i==0) ? "ffffff" : "cccccc" ),
+                       ( (i==0) ? "tab_cell_label" : "tab_cell_edit" ),
                        i,
                        i
                );
                wprintf("%s", tabnames[i]);
-               wprintf("</span></td>");
+               wprintf("</td>");
 
                wprintf("<td>&nbsp;</td>\n");
        }
 
        wprintf("</tr></table>\n");
-       wprintf("<table class=\"tabs_background\"><tr><td>");
+       wprintf("<div class=\"tabcontent\">");
 }
 
 /**
@@ -78,9 +75,11 @@ void end_tab(int tabnum, int num_tabs) {
        wprintf("<!-- end tab %d of %d -->\n", tabnum, num_tabs);
 
        if (tabnum == num_tabs-1) {
-               wprintf("</td></tr></table>\n");
+               wprintf("</div>\n");
                wprintf("<script type=\"text/javascript\">"
                        " Nifty(\"table#TheTabs td\", \"small transparent top\");"
+                       " Nifty(\"div.tabcontent\", \"big transparent bottom\");"
+                       " Nifty(\"div.tabcontent_submit\", \"big transparent bottom\");"
                        "</script>"
                );
        }