11 void tabbed_dialog(int num_tabs, char *tabnames[]) {
14 wprintf("<script type=\"text/javascript\"> "
15 "var previously_selected_tab = '0'; "
16 "function tabsel(which_tab) { "
17 " if (which_tab == previously_selected_tab) { "
20 " $('tabdiv'+previously_selected_tab).style.display = 'none'; "
21 " $('tabdiv'+which_tab).style.display = 'block'; "
22 " $('tabtd'+previously_selected_tab).className = 'tab_cell_edit'; "
23 " $('tabtd'+which_tab).className = 'tab_cell_label'; "
24 " previously_selected_tab = which_tab; "
29 wprintf("<table id=\"TheTabs\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
30 "<tr align=\"center\" style=\"cursor:pointer\"><td> </td>"
33 for (i=0; i<num_tabs; ++i) {
34 wprintf("<td id=\"tabtd%d\" class=\"%s\" "
35 "onClick='tabsel(\"%d\");'"
38 ( (i==0) ? "tab_cell_label" : "tab_cell_edit" ),
41 wprintf("%s", tabnames[i]);
44 wprintf("<td> </td>\n");
47 wprintf("</tr></table>\n");
51 * print the tab-header
53 * tabnum: number of the tab to print
54 * num_tabs: total number oftabs to be printed
57 void begin_tab(int tabnum, int num_tabs) {
59 if (tabnum == num_tabs) {
60 wprintf("<!-- begin tab-common epilogue -->\n");
61 wprintf("<div class=\"tabcontent_submit\">");
65 wprintf("<!-- begin tab %d of %d -->\n", tabnum, num_tabs);
66 wprintf("<div id=\"tabdiv%d\" style=\"display:%s\" class=\"tabcontent\" >",
68 ( (tabnum == 0) ? "block" : "none" )
74 * print the tab-footer
75 * tabnum: number of the tab to print
76 * num_tabs: total number of tabs to be printed
79 void end_tab(int tabnum, int num_tabs) {
81 if (tabnum == num_tabs) {
83 wprintf("<!-- end tab-common epilogue -->\n");
88 wprintf("<!-- end tab %d of %d -->\n", tabnum, num_tabs);
90 if (tabnum == num_tabs-1) {
91 wprintf("<script type=\"text/javascript\">"
92 " Nifty(\"table#TheTabs td\", \"small transparent top\");"