src/hg/encode/hgEncodeVocab/hgEncodeVocab.c 1.28
1.28 2009/12/03 22:11:44 kate
Simplify by: 1) setting link style globally 2) removing special syntax in antibody targets
Index: src/hg/encode/hgEncodeVocab/hgEncodeVocab.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/encode/hgEncodeVocab/hgEncodeVocab.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -b -B -U 4 -r1.27 -r1.28
--- src/hg/encode/hgEncodeVocab/hgEncodeVocab.c 1 Oct 2009 03:58:18 -0000 1.27
+++ src/hg/encode/hgEncodeVocab/hgEncodeVocab.c 3 Dec 2009 22:11:44 -0000 1.28
@@ -107,9 +107,9 @@
char *t = hashFindVal(ra, "vendorId");
char *u = hashFindVal(ra, "orderUrl");
printf(" <TD>");
if (u)
- printf("<A STYLE=\"text-decoration:none\" TARGET=_BLANK HREF=%s>", u);
+ printf("<A TARGET=_BLANK HREF=%s>", u);
printf("%s %s", s ? s : " ", t ? t : " ");
if (u)
printf("</A>");
puts("</TD>");
@@ -119,26 +119,17 @@
s = hashFindVal(ra, "lots");
printf(" <TD>%s</TD>\n", s ? s : " ");
- s = hashFindVal(ra, "targetLink");
- if(s)
- {
+ t = hashFindVal(ra, "targetId");
+ u = hashFindVal(ra, "targetUrl");
printf(" <TD>");
- u = strchr(s, '|');
if (u)
- {
- *u++ = 0;
- printf("<A STYLE=\"text-decoration:none\" TARGET=_BLANK HREF=%s>", u);
- }
- puts(s);
+ printf("<A TARGET=_BLANK HREF=%s>", u);
+ printf("%s", t ? t : " ");
if (u)
printf("</A>");
- puts("</TD>\n");
- }
- else
- printf(" <TD> </TD>\n");
-
+ puts("</TD>");
puts("</TR>");
}
else if (sameString(type,"ripAntibody"))
@@ -154,9 +145,9 @@
char *t = hashFindVal(ra, "vendorId");
char *u = hashFindVal(ra, "orderUrl");
printf(" <TD>");
if (u)
- printf("<A STYLE=\"text-decoration:none\" TARGET=_BLANK HREF=%s>", u);
+ printf("<A TARGET=_BLANK HREF=%s>", u);
printf("%s %s", s ? s : " ", t ? t : " ");
if (u)
printf("</A>");
puts("</TD>");
@@ -168,9 +159,9 @@
++(*total);
puts("<TR>");
s = hashFindVal(ra, "url");
if (s)
- printf(" <TD><A STYLE=\"text-decoration:none\" TARGET=_BLANK HREF=\"%s\">%s</A></TD>\n", s, term);
+ printf(" <TD><A TARGET=_BLANK HREF=\"%s\">%s</A></TD>\n", s, term);
else
printf(" <TD>%s</TD>\n", term);
s = hashFindVal(ra, "alternativeSymbols");
printf(" <TD>%s</TD>\n", s ? s : " ");
@@ -188,9 +179,9 @@
s = hashFindVal(ra, "termId");
u = hashFindVal(ra, "termUrl");
printf(" <TD>");
if (u)
- printf("<A STYLE=\"text-decoration:none\" TARGET=_BLANK HREF=%s>", u);
+ printf("<A TARGET=_BLANK HREF=%s>", u);
printf("%s", s ? s : " ");
if (u)
printf("</A>");
puts("</TD>");
@@ -268,27 +259,27 @@
}
safef(protocolUrl, sizeof(protocolUrl), "%s%s", PROTOCOL_DIR, fileName);
safef(protocolFile, sizeof(protocolFile), "%s%s", hDocumentRoot(), protocolUrl);
if (fileExists(protocolFile))
- printf(" <A STYLE=\"text-decoration:none\"HREF=%s TARGET=_BLANK>%s</A>\n", protocolUrl,title);
+ printf(" <A TARGET=_BLANK HREF=%s>%s</A>\n", protocolUrl,title);
}
freeMem(protocolSetting);
}
else
{ // generate a standard name
safef(protocolUrl, sizeof(protocolUrl), "%s%s_protocol.pdf", PROTOCOL_DIR, term);
safef(protocolFile, sizeof(protocolFile), "%s%s", hDocumentRoot(), protocolUrl);
if (fileExists(protocolFile))
- printf(" <A STYLE=\"text-decoration:none\"HREF=%s TARGET=_BLANK>%s</A>\n", protocolUrl,PROTOCOL_TITLE);
+ printf(" <A TARGET=_BLANK HREF=%s>%s</A>\n", protocolUrl,PROTOCOL_TITLE);
}
printf(" </TD>\n");
s = hashFindVal(ra, "vendorName");
char *t = hashFindVal(ra, "vendorId");
char *u = hashFindVal(ra, "orderUrl");
printf(" <TD>");
if (u)
- printf("<A STYLE=\"text-decoration:none\" TARGET=_BLANK HREF=%s>", u);
+ printf("<A TARGET=_BLANK HREF=%s>", u);
printf("%s %s", s ? s : " ", t ? t : " ");
if (u)
printf("</A>");
puts("</TD>");
@@ -296,9 +287,9 @@
s = hashFindVal(ra, "termId");
u = hashFindVal(ra, "termUrl");
printf(" <TD>");
if (u)
- printf("<A STYLE=\"text-decoration:none\" TARGET=_BLANK HREF=%s>", u);
+ printf("<A TARGET=_BLANK HREF=%s>", u);
printf("%s", s ? s : " ");
if (u)
printf("</A>");
puts("</TD>");
@@ -422,8 +413,9 @@
cgiSpoof(&argc, argv);
char *bgColor = cgiOptionalString("bgcolor");
if (bgColor)
htmlSetBgColor(strtol(bgColor, 0, 16));
+htmlSetStyle(htmlStyleUndecoratedLink);
htmShell("ENCODE Controlled Vocabulary", doMiddle, "get");
return 0;
}