2c4c9d5fee670cac2d67fd57cac606c4d619a1e6 hiram Thu Sep 14 11:00:37 2017 -0700 rework code to eliminate complicated double nested div elements refs #20094 diff --git src/hg/lib/web.c src/hg/lib/web.c index 91069cf..7b31f41 100644 --- src/hg/lib/web.c +++ src/hg/lib/web.c @@ -363,78 +363,72 @@ "
\n" "
\n" "
" ); htmlTextOut(title); puts("
\n" " " "\n" "
 \n\n" ); } -void webNewSectionHeaderStart(boolean hasTitle) +void webNewSectionHeaderStart() /* Start the header for a new section on the web page. * May be used to maintain table layout without a proper section header */ { webEndSection(); puts("
"); puts(""); puts( // TODO: Replace nested tables with CSS (difficulty is that tables are closed elsewhere) "
\n\n" " \n" "
\n" "
\n"); -if (hasTitle) - puts("
"); -else - puts("
"); +puts("
"); } -void webNewSectionHeaderEnd(boolean hasTitle) +void webNewSectionHeaderEnd() /* Properly close header of collapsible section on web page */ { -if (hasTitle) - puts("
\n"); -else - puts("
\n"); -puts(" " +puts(" \n" + "
" "\n" "
 \n\n"); } void webNewSection(char* format, ...) /* create a new section on the web page */ { va_list args; va_start(args, format); -webNewSectionHeaderStart(TRUE); +webNewSectionHeaderStart(); vprintf(format, args); -webNewSectionHeaderEnd(TRUE); +webNewSectionHeaderEnd(); va_end(args); } void webNewEmptySection() /* create a new section on the web page to maintain table layout */ { -webNewSectionHeaderStart(FALSE); -webNewSectionHeaderEnd(FALSE); +webNewSectionHeaderStart(); +webNewSectionHeaderEnd(); } void webEndSectionTables() /* Finish with section tables (but don't do /BODY /HTML like * webEnd does. */ { webEndSection(); puts("
\n"); } void webEnd() /* output the footer of the HTML page */ { if(!webInTextMode) {