Cleaned up some templated HTML:
[citadel.git] / webcit / tabs.c
index 78d2954ecdd4e5dd0eb439b9877bf752fa73a008..c9d1e60a8acf803432a8c3a8a45d956d82ae7c93 100644 (file)
@@ -12,7 +12,7 @@
 void tabbed_dialog(int num_tabs, char *tabnames[]) {
        int i;
 
-       wprintf("<script type=\"text/javascript\">                                              "
+       StrBufAppendPrintf(WC->trailing_javascript,
                "var previously_selected_tab = '0';                                             "
                "function tabsel(which_tab) {                                                   "
                "       if (which_tab == previously_selected_tab) {                             "
@@ -24,7 +24,6 @@ void tabbed_dialog(int num_tabs, char *tabnames[]) {
                "       $('tabtd'+which_tab).className = 'tab_cell_label';                      "
                "       previously_selected_tab = which_tab;                                    "
                "}                                                                              "
-               "</script>                                                                      \n"
        );
 
        wprintf("<table id=\"TheTabs\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
@@ -80,7 +79,7 @@ void begin_tab(int tabnum, int num_tabs) {
 void end_tab(int tabnum, int num_tabs) {
 
        if (tabnum == num_tabs) {
-               wprintf("</div>\n");
+               wprintf("</div> <!-- end of 'tabcontent_submit' div -->\n");
                wprintf("<!-- end tab-common epilogue -->\n");
        }