d290cfad327fd9e122186d8b5ccd54d0330714ae
larrym
Mon Oct 24 20:23:05 2011 -0700
remove obsolete TOO_TIMID_FOR_CURRENT_HTML_STANDARDS code (code cleanup to get ready for jabico related menu redesign)
diff --git src/hg/lib/web.c src/hg/lib/web.c
index 301c1a9..f8d9ecb 100644
--- src/hg/lib/web.c
+++ src/hg/lib/web.c
@@ -138,42 +138,37 @@
if (sameString(cgiUsualString("action",""),"encodeReleaseLog") ||
rStringIn("EncodeDataVersions", scriptName))
isEncode = TRUE;
/* Preamble. */
dnaUtilOpen();
if (withHttpHeader)
puts("Content-type:text/html\n");
if (withHtmlHeader)
{
char *newString, *ptr1, *ptr2;
-//#define TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
-#ifdef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
- puts("");
-#else///ifndef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
char *browserVersion;
if (btIE == cgiClientBrowser(&browserVersion, NULL, NULL) && *browserVersion < '8')
puts("");
else
puts("");
// Strict would be nice since it fixes atleast one IE problem (use of :hover CSS pseudoclass)
//puts("");
-#endif///ndef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
puts(
"" "\n"
"
" "\n"
);
printf("\t%s\n", headerText);
printf("\t"
);
/* we need to take any HTML formatting out of the titlebar string */
newString = cloneString(textOutBuf);
for(ptr1=newString, ptr2=textOutBuf; *ptr2 ; ptr2++)
@@ -215,134 +210,56 @@
"
"
"");
puts("
");
}
else
{
puts("
");
}
puts("" "\n"
"" "\n" );
}
/* Put up the hot links bar. */
if (isGisaid)
{
-#ifndef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
-
printf("\n");
printf("Home | \n"); // Home
if (haveBlat)
printf("Blat | \n"); // Blat
printf("Sample View | \n"); // Subject View
printf("Sequence View | \n",uiState); // Sequence View
printf("Table View | \n"); // Table View
printf(" |
\n"); // last column squeezes other columns left
-
-#else///ifdef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
- printf("\n");
- printf("\n");
-
- /* Home */
- printf("Home | ");
-
- /* Blat */
- if (haveBlat)
- printf("Blat | ");
-
- /* Subject View */
- printf("%s | ", "Sample View");
-
- /* Sequence View */
- printf("Sequence View | ",
- uiState);
-
- /* Table View */
- printf("%s | ", "Table View");
-
- /* Help */
-/* disable help for the time being */
-/*
- if (endsWith(scriptName, "hgBlat"))
- {
- printf("%s | ", "Help");
- }
- else
- {
- printf("%s | ", "Help");
- }
-*/
- printf(" ");
- printf(" |
\n");
-#endif///def TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
}
else if (isGsid)
{
-#ifndef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
-
printf("\n");
printf("Home | \n"); // Home
if (haveBlat)
printf("Blat | \n"); // Blat
printf("Subject View | \n"); // Subject View
printf("Sequence View | \n",uiState); // Sequence View
printf("Table View | \n"); // Table View
if (endsWith(scriptName, "hgBlat"))
printf("Help | \n"); // Help
else
printf("Help | \n"); // Help
printf(" |
\n"); // last column squeezes other columns left
-
-#else///ifdef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
- printf("\n");
- printf("\n");
-
- /* Home */
- printf("Home | ");
-
- /* Blat */
- if (haveBlat)
- printf("Blat | ");
-
- /* Subject View */
- printf("%s | ", "Subject View");
-
- /* Sequence View */
- printf("Sequence View | ",
- uiState);
-
- /* Table View */
- printf("%s | ", "Table View");
-
- /* Help */
-
- if (endsWith(scriptName, "hgBlat"))
- {
- printf("%s | ", "Help");
- }
- else
- {
- printf("%s | ", "Help");
- }
- printf(" ");
- printf(" |
\n");
-#endif///def TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
}
else if (dbIsFound)
{
-#ifndef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
-
puts("\n");
puts("");
if (isEncode)
printf("Home | \n");
else
{
printf("Home | \n", uiState);
if (isGsid)
printf("Subject View | \n",uiState);
else
printf("Genomes | \n",uiState);
if (endsWith(scriptName, "hgTracks") || endsWith(scriptName, "hgGene") ||
endsWith(scriptName, "hgTables") || endsWith(scriptName, "hgTrackUi") ||
@@ -414,224 +331,48 @@
printf("Help | \n");
}
}
printf(" | \n"); // last column squeezes other columns left
puts(" |
\n");
-#else///ifdef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
- puts(
- "" "\n"
- "" "\n"
- "" "\n"
- "" "\n"
- " " "\n"
- " " "\n"
- );
-
-if (isEncode)
- {
- printf("" "\n");
- puts(" Home");
- }
-else
- {
- printf("" "\n", uiState);
- puts(" Home ");
- if (isGsid)
- {
- printf(" \n",
- uiState);
- puts(" Subject View ");
- }
- if (!isGsid)
- {
- printf(" \n",
- uiState);
- puts(" Genomes ");
- }
- if (endsWith(scriptName, "hgTracks") || endsWith(scriptName, "hgGene") ||
- endsWith(scriptName, "hgTables") || endsWith(scriptName, "hgTrackUi") ||
- endsWith(scriptName, "hgSession") || endsWith(scriptName, "hgCustom") ||
- endsWith(scriptName, "hgHubConnect") ||
- endsWith(scriptName, "hgc") || endsWith(scriptName, "hgPal"))
- {
- printf(" \n",
- uiState,TRACK_SEARCH);
- puts(" Genome Browser ");
- }
- if (haveBlat && !endsWith(scriptName, "hgBlat"))
- {
- printf(" ",
- theCart ? "&" : "", uiState+1 );
- puts(" Blat ");
- }
- }
- {
- char *table = (theCart == NULL ? NULL :
- (endsWith(scriptName, "hgGene") ?
- cartOptionalString(theCart, "hgg_type") :
- cartOptionalString(theCart, "g")));
- if (table && theCart &&
- (endsWith(scriptName, "hgc") || endsWith(scriptName, "hgTrackUi") ||
- endsWith(scriptName, "hgGene")))
- {
- struct trackDb *tdb = hTrackDbForTrack(db, table);
- if (tdb != NULL)
- printf(" \n",
- uiState, tdb->grp, tdb->track, tdb->table);
- else
- printf(" \n",
- uiState);
- trackDbFree(&tdb);
- }
- else
- printf(" \n",
- uiState, theCart ? "&" : "?" );
- }
- /* disable TB for both GSID and CGB servers */
- if (!isGsid && !hIsCgbServer()) puts(" Tables ");
- if (!endsWith(scriptName, "hgNear"))
- /* possible to make this conditional: if (db != NULL && hgNearOk(db)) */
- if (db != NULL && hgNearOk(db))
- {
- if (isGsid)
- {
- printf(" \n",
- uiState);
- puts(" Table View ");
- }
- else
- {
- printf(" \n",
- uiState);
- puts(" Gene Sorter ");
- }
- }
- if ((!endsWith(scriptName, "hgPcr")) && (db == NULL || hgPcrOk(db)))
- {
- printf(" \n",
- uiState);
- puts(" PCR ");
- }
- if (endsWith(scriptName, "hgGenome"))
- {
- printf(" \n",
- uiState);
- puts(" PDF/PS ");
- }
- if (endsWith(scriptName, "hgHeatmap"))
- {
- printf(" \n",
- uiState);
- puts(" PDF/PS ");
- }
-#ifndef GBROWSE
- if (wikiLinkEnabled() && !endsWith(scriptName, "hgSession"))
- {
- printf("Session",
- uiState, theCart ? "&" : "?" );
- puts("");
- }
-#endif /* GBROWSE */
- if (!isGsid) puts(" " "\n"
- " FAQ " "\n"
- );
- if (!isGsid)
- {
- if (endsWith(scriptName, "hgBlat"))
- puts(" ");
- 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"
" "
);
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;
va_copy(argscp,args);
@@ -706,66 +447,45 @@
" | | " "\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"
" "
);
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 */
{
|
|
|
|
|
|
|
|
|