src/hg/hgTables/mainPage.c 1.149
1.149 2010/04/22 19:25:22 bristor
Added support for integration between the table browser and GREAT.
Index: src/hg/hgTables/mainPage.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTables/mainPage.c,v
retrieving revision 1.148
retrieving revision 1.149
diff -b -B -U 4 -r1.148 -r1.149
--- src/hg/hgTables/mainPage.c 12 Apr 2010 16:20:59 -0000 1.148
+++ src/hg/hgTables/mainPage.c 22 Apr 2010 19:25:22 -0000 1.149
@@ -427,20 +427,30 @@
}
if (! otInOtList)
outputType = otDefault->name;
}
-hPrintf("<SELECT NAME=%s>\n", hgtaOutputType);
+hPrintf("<SELECT NAME=\"%s\">", hgtaOutputType);
for (ot = otList; ot != NULL; ot = ot->next)
{
hPrintf(" <OPTION VALUE=%s", ot->name);
if (sameString(ot->name, outputType))
hPrintf(" SELECTED");
+ if (sameString(ot->name, outBed) || sameString(ot->name, outWigBed))
+ hPrintf(" id=\"outBed\"");
hPrintf(">%s\n", ot->label);
}
hPrintf("</SELECT>\n");
hPrintf(" ");
-cartMakeCheckBox(cart, "sendToGalaxy", FALSE);
-hPrintf(" Send output to <A HREF=\"http://g2.bx.psu.edu\" target=_BLANK>Galaxy</A>");
+hPrintf(" Send output to ");
+cgiMakeCheckBoxIdAndJS("sendToGalaxy", FALSE,
+ "checkboxGalaxy",
+ "onclick=\"document.getElementById('checkboxGreat').checked=false; return true;\"");
+hPrintf("<A HREF=\"http://g2.bx.psu.edu\" target=_BLANK>Galaxy</A>\n");
+nbSpaces(2);
+cgiMakeCheckBoxIdAndJS("sendToGreat", FALSE,
+ "checkboxGreat",
+ "onclick=\"return onSelectGreat();\"");
+hPrintf(" <A HREF=\"http://great.stanford.edu/help/index.php/Main_Page\" target=_BLANK>GREAT</A>");
hPrintf("</TD></TR>\n");
}
struct outputType otAllFields = { NULL,
@@ -919,12 +929,24 @@
"features and usage. "
"For more complex queries, you may want to use "
"<A HREF=\"http://main.g2.bx.psu.edu\" target=_BLANK>Galaxy</A> or "
"our <A HREF=\"http://genome.ucsc.edu/FAQ/FAQdownloads#download29\">public "
- "MySQL server</A>. Refer to the "
+ "MySQL server</A>. "
+ "To examine the biological function of your set through annotation "
+ "enrichments, send the data to "
+ "<A HREF=\"http://great.stanford.edu/public\">GREAT</A>. Refer to the "
"<A HREF=\"../goldenPath/credits.html\">Credits</A> page for the list of "
"contributors and usage restrictions associated with these data.");
+hPrintf("<script type=\"text/javascript\">\n");
+hPrintf("function onSelectGreat() {\n");
+hPrintf("document.getElementById('checkboxGalaxy').checked=false;\n");
+hPrintf("document.getElementById('outBed').selected=true;\n");
+hPrintf("return true;\n");
+hPrintf("}\n");
+hPrintf("</script>\n");
+
+
/* Main form. */
hPrintf("<FORM ACTION=\"%s\" NAME=\"mainForm\" METHOD=%s>\n",
getScriptName(), cartUsualString(cart, "formMethod", "POST"));
cartSaveSession(cart);