e7c4d6dbee3af414e59ce069da1f230f769d894e
larrym
  Wed Oct 20 12:20:58 2010 -0700
ignore configureByPopup setting for description only popups and add target='_blank' to links
diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js
index eb78d07..75c8702 100644
--- src/hg/js/hgTracks.js
+++ src/hg/js/hgTracks.js
@@ -1894,7 +1894,7 @@
         myLink += "&descriptionOnly=1";
 
     var rec = trackDbJson[trackName];
-    if(rec != null && rec["configureByPopup"] != null && !rec["configureByPopup"]) {
+    if(!descriptionOnly && rec != null && rec["configureByPopup"] != null && !rec["configureByPopup"]) {
         window.location = myLink;
     } else {
         myLink += "&ajax=1";
@@ -1958,6 +1958,10 @@
 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
+        response = response.replace(/<a /ig, "<a target='_blank' ");
+    }
     $('#hgTrackUiDialog').html("<div id='pop'>" + response + "</div>");
     $('#hgTrackUiDialog').dialog({
                                ajaxOptions: {