4e5e4b111651337ddd7d36320f1f667d6c035788 kate Tue Jan 28 14:46:42 2014 -0800 1. Bug fix: need section on details page for peak clusters lacking motif. 2. Some code simplification. refs #9092 diff --git src/hg/lib/web.c src/hg/lib/web.c index 005bd40..c0b10e9 100644 --- src/hg/lib/web.c +++ src/hg/lib/web.c @@ -345,79 +345,90 @@ va_end(args); } void webStartHeader(struct cart *theCart, char *db, char *headerText, char *format, ...) /* Print out pretty wrapper around things when not from cart. * Include headerText in the html header. */ { va_list args; va_start(args, format); webStartWrapperGatewayHeader(theCart, db, headerText, format, args, TRUE, TRUE, FALSE); va_end(args); } -static void webEndSection() +void webEndSection() /* Close down a section */ { puts( "" "\n" " " "\n" // "
" " " "\n" " " "\n" " " ); puts(""); } -void webNewSectionHeaderStart() -/* Start the header for a new section on the web page */ +void webNewSectionHeaderStart(boolean hasTitle) +/* 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" - "
"); + "' WIDTH='100%' BORDER='0' CELLSPACING='0' CELLPADDING='0'>
\n"); +if (hasTitle) + puts("
"); +else + puts("
"); } void webNewSectionHeaderEnd() /* Properly close header of collapsible section on web page */ { 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(); +webNewSectionHeaderStart(TRUE); vprintf(format, args); webNewSectionHeaderEnd(); va_end(args); } +void webNewEmptySection() +/* create a new section on the web page to maintain table layout */ +{ +webNewSectionHeaderStart(FALSE); +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) { webEndSectionTables(); #ifndef GBROWSE