33b21a1f81a7f5cc388f780fabdf48d315014ea9
tdreszer
  Fri Jul 30 13:02:38 2010 -0700
Checked in Kate's navigation links, slightly modified.  Feature is ifdef'd out currently
diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index 88f6349..845e25f 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -69,6 +69,21 @@
 return makeNamedDownloadsLink(database, tdb,"Downloads");
 }
 
+#ifdef BIG_UI_NAV_LINKS
+void makeTopLink(struct trackDb *tdb)
+/* Link to top of UI page */
+{
+if (trackDbSetting(tdb, "dimensions"))
+    {
+    char *upArrow = "⇑";
+    if (cgiBrowser() == btIE)
+        upArrow = "↑";
+    // Note: the nested spans are so that javascript can determine position and selectively display the link when appropriate
+    printf("<span><span class='navUp' style='float:right; display:none'>&nbsp;&nbsp;<A HREF='#' TITLE='Return to top of page'>Top%s</A></span></span>\n",upArrow);
+    }
+}
+#endif///def BIG_UI_NAV_LINKS
+
 boolean makeSchemaLink(char *db,struct trackDb *tdb,char *label)
 // Make a table schema link (if appropriate and then returns TRUE)
 {
@@ -163,6 +178,7 @@
 
 if(moreThanOne)
     printf("</td></tr></table>");
+
 puts("</P>");
 }
 
@@ -3647,6 +3663,10 @@
 boolean preSorted = FALSE;
 boolean useDragAndDrop = sameOk("subTracks",trackDbSetting(parentTdb, "dragAndDrop"));
 
+#ifdef BIG_UI_NAV_LINKS
+makeTopLink(parentTdb);
+#endif//def BIG_UI_NAV_LINKS
+
 // Now we can start in on the table of subtracks
 printf("\n<TABLE CELLSPACING='2' CELLPADDING='0' border='0'");
 if(sortOrder != NULL)
@@ -3694,7 +3714,11 @@
     printf("<TR");
     if(useDragAndDrop)
         printf(" id=\"noDrag\" class='nodrop nodrag'");
-    printf("><TD colspan='%d'><B>List subtracks:&nbsp;", colspan);
+    printf(">");
+    #ifdef BIG_UI_NAV_LINKS
+    printf("<A NAME='DISPLAY_SUBTRACKS'></A>");
+    #endif//def BIG_UI_NAV_LINKS
+    printf("<TD colspan='%d'><B>List subtracks:&nbsp;", colspan);
     safef(javascript, sizeof(javascript), "onclick=\"showOrHideSelectedSubtracks(true);\"");
     cgiMakeOnClickRadioButton("displaySubtracks", "selected", !displayAll,javascript);
     puts("only selected/visible &nbsp;&nbsp;");