59cb737fcf0f337665d4c61ea06b21d96e40484e
larrym
  Thu Dec 9 11:47:39 2010 -0800
don't include hgsdid in getDna call (redmine 1333 #5)
diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js
index a2b4fd3..c7db659 100644
--- src/hg/js/hgTracks.js
+++ src/hg/js/hgTracks.js
@@ -1543,31 +1543,31 @@
                 a = /hgc.*\W+c=(\w+)/.exec(href);
                 if(a && a[1])
                     chrom = a[1];
                 a = /o=(\d+)/.exec(href);
                 if(a && a[1])
                     chromStart = parseInt(a[1]) + 1;
                 a = /t=(\d+)/.exec(href);
                 if(a && a[1])
                     chromEnd = parseInt(a[1]);
             }
             if(chrom == null || chromStart == null || chromEnd == null) {
                 showWarning("couldn't parse out genomic coordinates");
             } else {
                 if(cmd == 'getDna')
                 {
-                    if(window.open("../cgi-bin/hgc?hgsid=" + getHgsid() + "&g=getDna&i=mixed&c=" + chrom + "&l=" + (chromStart - 1) + "&r=" + chromEnd) == null) {
+                    if(window.open("../cgi-bin/hgc?g=getDna&i=mixed&c=" + chrom + "&l=" + (chromStart - 1) + "&r=" + chromEnd) == null) {
                         windowOpenFailedMsg();
                     }
                 } else {
                     var newPosition = setPositionByCoordinates(chrom, chromStart, chromEnd);
                     if(browser == "safari" || imageV2) {
                         // We need to parse out more stuff to support resetting the position under imageV2 via ajax, but it's probably possible.
                         // See comments below on safari problems.
                         jQuery('body').css('cursor', 'wait');
                         if(document.TrackForm)
                             document.TrackForm.submit();
                         else
                             document.TrackHeaderForm.submit();
                     } else {
                         // XXXX This attempt to "update whole track image in place" didn't work for a variety of reasons, so this is dead code, but
                         // I'm leaving it in case we try to implement this functionality in the future.
@@ -2052,30 +2052,32 @@
         if(b[1]) {
             $('#chrom').attr('src', b[1]);
         }
     }
     var re = /<\!-- trackDbJson -->\n<script>var trackDbJson = ([\S\s]+)<\/script>\n<\!-- trackDbJson -->/m;
     a = re.exec(response);
     if(a && a[1]) {
         var json = eval("(" + a[1] + ")");
         if(json && json[this.id]) {
             var visibility = visibilityStrsOrder[json[this.id].visibility];
             var limitedVis;
             if(json[this.id].limitedVis)
                 limitedVis = visibilityStrsOrder[json[this.id].limitedVis];
             if(this.newVisibility && limitedVis && this.newVisibility != limitedVis)
                 alert("There are too many items to display the track in " + this.newVisibility + " mode.");
+            var rec = trackDbJson[this.id];
+            rec.limitedVis = json[this.id].limitedVis;
             updateVisibility(this.id, visibility);
         } else {
             showWarning("Invalid trackDbJson received from the server");
         }
     } else {
         showWarning("trackDbJson is missing from the response");
     }
     if(imageV2 && this.id && this.cmd && this.cmd != 'wholeImage' && this.cmd != 'selectWholeGene') {
           // Extract <TR id='tr_ID'>...</TR> and update appropriate row in imgTbl;
           // this updates src in img_left_ID, img_center_ID and img_data_ID and map in map_data_ID
           var id = this.id;
           if(this.loadingId) {
 	          hideLoadingImage(this.loadingId);
           }
           var rec = trackDbJson[id];