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/hgTrackUi/hgTrackUi.c src/hg/hgTrackUi/hgTrackUi.c
index 8714df0..02b8142 100644
--- src/hg/hgTrackUi/hgTrackUi.c
+++ src/hg/hgTrackUi/hgTrackUi.c
@@ -2419,6 +2419,8 @@
 /* Put up track-specific user interface. */
 {
 jsIncludeFile("jquery.js", NULL);
+printf("<link href='../style/jquery-ui.css' rel='stylesheet' type='text/css' />\n");
+jsIncludeFile("jquery-ui.js", NULL);
 jsIncludeFile("utils.js",NULL);
 #define RESET_TO_DEFAULTS "defaults"
 char setting[128];
@@ -2437,18 +2439,29 @@
 printf("<FORM ACTION=\"%s\" NAME=\""MAIN_FORM"\" METHOD=%s>\n\n",
        hgTracksName(), cartUsualString(cart, "formMethod", "POST"));
 cartSaveSession(cart);
+#ifdef BIG_UI_NAV_LINKS
+printf("<B style='font-family:serif; font-size:200%%;'>%s%s</B>\n", tdb->longLabel, tdbIsSuper(tdb) ? " Tracks" : "");
+#else///ifndef BIG_UI_NAV_LINKS
 printf("<H1>%s%s</H1>\n", tdb->longLabel, tdbIsSuper(tdb) ? " Tracks" : "");
+#endif///ndef BIG_UI_NAV_LINKS
 
 /* Print link for parent track */
 struct trackDb *parentTdb = tdb->parent;
 if (parentTdb)
     {
     char *encodedMapName = cgiEncode(parentTdb->track);
+#ifdef BIG_UI_NAV_LINKS
+    printf("&nbsp;&nbsp;<B style='font-family:serif; font-size:100%%;'>(<A HREF=\"%s?%s=%u&c=%s&g=%s\" title='Link to parent track'><IMG height=12 src='../images/ab_up.gif'>%s</A>)</B>",
+#else///ifndef BIG_UI_NAV_LINKS
     printf("<H3>Parent track: <A HREF=\"%s?%s=%u&c=%s&g=%s\">%s</A></H3>",
+#endif///ndef BIG_UI_NAV_LINKS
 		hgTrackUiName(), cartSessionVarName(), cartSessionId(cart),
 		chromosome, encodedMapName, parentTdb->shortLabel);
     freeMem(encodedMapName);
     }
+#ifdef BIG_UI_NAV_LINKS
+    puts("<BR><BR>");
+#endif///def BIG_UI_NAV_LINKS
 
 if (ct && sameString(tdb->type, "maf"))
     tdb->canPack = TRUE;
@@ -2475,10 +2488,10 @@
 printf("&nbsp;");
 cgiMakeButton("Submit", "Submit");
 
+//#ifndef BIG_UI_NAV_LINKS
 if(tdbIsComposite(tdb))
-    {
     printf("\n&nbsp;&nbsp;<a href='#' onclick='setVarAndPostForm(\"%s\",\"1\",\"mainForm\"); return false;'>Reset to defaults</a>\n",setting);
-    }
+//#endif///ndef BIG_UI_NAV_LINKS
 
 if (ct)
     {
@@ -2490,6 +2503,32 @@
         cgiMakeOnClickButton("document.customTrackForm.submit();return false;",
                                 "Update custom track");
     }
+
+#ifdef BIG_UI_NAV_LINKS
+if (!tdbIsSuper(tdb))
+    {
+    // NAVLINKS - For pages w/ matrix, add Description, Subtracks and Downloads links
+    if (trackDbSetting(tdb, "dimensions"))
+        {
+        printf("\n&nbsp;&nbsp;<span id='navDown' style='float:right; display:none;'>jump to:");
+        //printf("<A HREF='#DISPLAY_SUBTRACKS' TITLE='Jump to subtracks section of page'>Subtracks&dArr;</A>&nbsp;&nbsp;<A HREF='#TRACK_HTML' TITLE='Jump to description section of page'>Description&darr;</A>");
+        if (trackDbSetting(tdb, "wgEncode"))
+            {
+            printf("&nbsp;&nbsp;");
+            makeDownloadsLink(database, tdb);
+            }
+        char *downArrow = "&dArr;";
+        enum browserType browser = cgiBrowser();
+        if (browser == btIE || browser == btFF)
+            downArrow = "&darr;";
+        printf("&nbsp;&nbsp;<A HREF='#DISPLAY_SUBTRACKS' TITLE='Jump to subtracks section of page'>Subtracks%s</A>",downArrow);
+        printf("&nbsp;&nbsp;<A HREF='#TRACK_HTML' TITLE='Jump to description section of page'>Description%s</A>",downArrow);
+        printf("&nbsp;</span>");
+        }
+    //if(tdbIsComposite(tdb))
+    //    printf("\n&nbsp;&nbsp;<button type='button' title='Reset all track and subtrack settings to defaults.' onclick='setVarAndPostForm(\"%s\",\"1\",\"mainForm\"); return false;'>Reset</button><BR>\n",setting);
+    }
+#endif///ndef BIG_UI_NAV_LINKS
 printf("<BR>\n");
 
 specificUi(tdb, ct);
@@ -2528,7 +2567,19 @@
 if (tdb->html != NULL && tdb->html[0] != 0)
     {
     htmlHorizontalLine();
+    #ifdef BIG_UI_NAV_LINKS
+    // include anchor for Description link
+    puts("<A NAME=TRACK_HTML></A>");
+    printf("<table class='windowSize'><tr valign='top'><td>");
+    #endif///def BIG_UI_NAV_LINKS
     puts(tdb->html);
+    #ifdef BIG_UI_NAV_LINKS
+    printf("</td><td>");
+    makeTopLink(tdb);
+    printf("&nbsp</td></tr><tr valign='bottom'><td colspan=2>");
+    makeTopLink(tdb);
+    printf("&nbsp</td></tr></table>");
+    #endif///def BIG_UI_NAV_LINKS
     }
 }	/*	void trackUi(struct trackDb *tdb)	*/