aab4f66a2aca5293f3536cc1d1438b17d2b09dfd
tdreszer
Thu May 5 16:14:15 2011 -0700
A large set of tiny changes. These fix a lot of discrepencies with bgcolor and font color declarations which were tripping up docttype 4.01.
diff --git src/hg/lib/web.c src/hg/lib/web.c
index ddc0b4d..b2ad53c 100644
--- src/hg/lib/web.c
+++ src/hg/lib/web.c
@@ -568,47 +568,66 @@
puts(" class=\"topbar\">");
puts(" Help ");
}
}
puts("" "\n"
" " "\n"
"" "\n"
" " "\n"
"" "\n"
);
#endif///def TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
if(!skipSectionHeader)
/* this HTML must be in calling code if skipSectionHeader is TRUE */
{
+#ifndef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
+ puts( // TODO: Replace nested tables with CSS (difficulty is that tables are closed elsewhere)
+ "" "\n"
+ "
\n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " "
+ );
+ htmlTextOut(textOutBuf);
+
+ puts(
+ " | | \n"
+ " | \n"
+ " | \n\n"
+ );
+#else///ifdef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
puts(
"" "\n"
" | " "\n"
" " "\n"
" " "\n"
" " "\n"
" " "\n"
" "
);
htmlTextOut(textOutBuf);
puts(
" | | " "\n"
" | " "\n"
" | " "\n"
" " "\n"
);
+#endif///def TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
};
webPushErrHandlers();
/* set the flag */
webHeadAlreadyOutputed = TRUE;
} /* static void webStartWrapperDetailedInternal() */
void webStartWrapperDetailedArgs(struct cart *theCart, char *db,
char *headerText, char *format, va_list args, boolean withHttpHeader,
boolean withLogo, boolean skipSectionHeader, boolean withHtmlHeader)
/* output a CGI and HTML header with the given title in printf format */
{
char textOutBuf[1024];
va_list argscp;
@@ -684,48 +703,67 @@
" | | " "\n"
// " "
" | " "\n"
" | " "\n"
" " );
}
void webNewSection(char* format, ...)
/* create a new section on the web page */
{
va_list args;
va_start(args, format);
webEndSection();
puts("");
+#ifndef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
+puts( // TODO: Replace nested tables with CSS (difficulty is that tables are closed elsewhere)
+ " \n\n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " "
+);
+
+vprintf(format, args);
+
+puts(
+ " | \n"
+ " | \n"
+ " | \n\n"
+);
+#else///ifdef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
puts(
" " "\n"
"" "\n"
" " "\n"
" " "\n"
" " "\n"
" " "\n"
" "
);
vprintf(format, args);
puts(
" | " "\n"
" | " "\n"
" | " "\n"
"" "\n"
);
+#endif///def TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
va_end(args);
}
void webEndSectionTables()
/* Finish with section tables (but don't do /BODY /HTML lik
* webEnd does. */
{
webEndSection();
puts(" | \n");
}
void webEnd()
/* output the footer of the HTML page */
{
@@ -1287,67 +1325,67 @@
}
void webIncludeHelpFile(char *fileRoot, boolean addHorizLine)
/* Given a help file root name (e.g. "hgPcrResult" or "cutters"),
* print out the contents of the file. If addHorizLine, print out an
* first. */
{
if (addHorizLine)
htmlHorizontalLine();
webIncludeFile(hHelpFile(fileRoot));
}
void webPrintLinkTableStart()
/* Print link table start in our colors. */
{
-printf("\n");
+printf("\n");
printf("\n");
}
void webPrintLinkTableEnd()
/* Print link table end in our colors. */
{
printf(" \n");
printf(" | \n");
}
void webPrintLinkOutCellStart()
/* Print link cell that goes out of our site. End with
* webPrintLinkTableEnd. */
{
-printf(" | ");
+printf(" | ");
}
void webPrintWideCellStart(int colSpan, char *bgColorRgb)
/* Print link multi-column cell start in our colors. */
{
-printf(" | 1)
printf(" COLSPAN=%d", colSpan);
printf(">");
}
void webPrintLinkCellStart()
/* Print link cell start in our colors. */
{
webPrintWideCellStart(1, HG_COL_TABLE);
}
void webPrintLinkCellRightStart()
/* Print right-justified cell start in our colors. */
{
-printf(" | ");
+printf(" | ");
}
void webPrintLinkCellEnd()
/* Print link cell end in our colors. */
{
printf(" | ");
}
void webPrintLinkCell(char *link)
/* Print link cell in our colors, if links is null, print empty cell */
{
webPrintLinkCellStart();
if (link != NULL)
puts(link);
webPrintLinkCellEnd();
@@ -1360,43 +1398,43 @@
printf("%d", val);
webPrintLinkCellEnd();
}
void webPrintDoubleCell(double val)
/* Print right-justified cell in our colors with two digits to right of decimal. */
{
webPrintLinkCellRightStart();
printf("%4.2f", val);
webPrintLinkCellEnd();
}
void webPrintWideLabelCell(char *label, int colSpan)
/* Print label cell over multiple columns in our colors. */
{
-printf(" 1)
printf(" COLSPAN=%d", colSpan);
-printf(">%s | ", label);
+printf(">%s", label);
}
void webPrintWideCenteredLabelCell(char *label, int colSpan)
/* Print label cell over multiple columns in our colors and centered. */
{
-printf(" 1)
printf(" COLSPAN=%d", colSpan);
-printf(">%s | ", label);
+printf(">%s", label);
}
void webPrintLabelCell(char *label)
/* Print label cell in our colors. */
{
webPrintWideLabelCell(label, 1);
}
void webPrintLinkTableNewRow()
/* start a new row */
{
printf(" \n");
}
void finishPartialTable(int rowIx, int itemPos, int maxPerRow,
|
|
|
|
|
|
|
|
|