781232cb7849ef2d0dd58e9fad976ab18987627a
larrym
  Mon Nov 22 20:52:23 2010 -0800
remove popUpTrackDescriptionOnly test for code that fixes up links in handleTrackUi
diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js
index 1256431..f4406e9 100644
--- src/hg/js/hgTracks.js
+++ src/hg/js/hgTracks.js
@@ -1622,31 +1622,31 @@
         $.ajax({
                    type: "GET",
                    url: "../cgi-bin/hgTracks",
                    data: data,
                    dataType: "html",
                    trueSuccess: handleViewImg,
                    success: catchErrorOrDispatch,
                    error: errorHandler,
                    cmd: cmd,
                    cache: false
                });
     } else if (cmd == 'openLink') {
         // Remove hgsid to force a new session (see redmine ticket 1333).
         var href = removeHgsid(selectedMenuItem.href);
         var chrom = $("input[name=chromName]").val();
-        if(href.indexOf("c=" + chrom) == -1) {
+        if(chrom && href.indexOf("c=" + chrom) == -1) {
             // make sure the link contains chrom info (necessary b/c we are stripping hgsid)
             href = href + "&c=" + chrom;
         }
         if(window.open(href) == null) {
             windowOpenFailedMsg();
         }
     } else if (cmd == 'followLink') {
         // XXXX This is blocked by Safari's popup blocker (without any warning message).
         location.assign(selectedMenuItem.href);
     } else {   // if( cmd in 'hide','dense','squish','pack','full','show' )
         // Change visibility settings:
         //
         // First change the select on our form:
         var id = selectedMenuItem.id;
         var rec = trackDbJson[id];
@@ -1915,30 +1915,31 @@
 var popUpTrackDescriptionOnly = false;
 var popSaveAllVars = null;
 function _hgTrackUiPopUp(trackName,descriptionOnly)
 { // popup cfg dialog
     popUpTrackName = trackName;
     var myLink = "../cgi-bin/hgTrackUi?g=" + trackName + "&hgsid=" + getHgsid() + "&db=" + getDb();
     popUpTrackDescriptionOnly = descriptionOnly;
     if(popUpTrackDescriptionOnly)
         myLink += "&descriptionOnly=1";
 
     var rec = trackDbJson[trackName];
     if(!descriptionOnly && rec != null && rec["configureBy"] != null) {
         if (rec["configureBy"] == 'none')
             return;
         else if (rec["configureBy"] == 'clickThrough') {
+            jQuery('body').css('cursor', 'wait');
             window.location = myLink;
             return;
         }  // default falls through to configureBy popup
     }
     myLink += "&ajax=1";
     $.ajax({
                 type: "GET",
                 url: myLink,
                 dataType: "html",
                 trueSuccess: handleTrackUi,
                 success: catchErrorOrDispatch,
                 error: errorHandler,
                 cmd: selectedMenuItem,
                 cache: false
             });
@@ -1974,34 +1975,34 @@
                 updateVisibility(trackName, newVis);
             }
             var urlData = varHashToQueryString(changedVars);
             if(mapIsUpdateable) {
                 updateTrackImg(trackName,urlData,"");
             } else {
                 window.location = "../cgi-bin/hgTracks?" + urlData + "&hgsid=" + getHgsid();
             }
         }
     }
 }
 
 function handleTrackUi(response, status)
 {
 // Take html from hgTrackUi and put it up as a modal dialog.
-    if(popUpTrackDescriptionOnly) {
-        // make sure all links open up in a new window
+
+    // make sure all links (e.g. help links) open up in a new window
         response = response.replace(/<a /ig, "<a target='_blank' ");
-    }
+    
     $('#hgTrackUiDialog').html("<div id='pop'>" + response + "</div>");
     $('#hgTrackUiDialog').dialog({
                                ajaxOptions: {
                                    // This doesn't work
                                    cache: true
                                },
                                resizable: popUpTrackDescriptionOnly,
                                height: 'auto',
                                width: 'auto',
                                minHeight: 200,
                                minWidth: 700,
                                modal: true,
                                closeOnEscape: true,
                                autoOpen: false,
                                buttons: { "OK": function() {
