3043345c244f6923a5ca24718e4768edd6368e9c
kate
  Thu Feb 4 14:04:57 2016 -0800
Fixes to Apply button on hgTrackUi popup.  Cosmetics on GTEx UI.

diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js
index 91f5b5b..01d0365 100644
--- src/hg/js/hgTracks.js
+++ src/hg/js/hgTracks.js
@@ -33,35 +33,38 @@
 
         imageV2.imgTbl = $('#imgTbl');
         // imageV2.enabled === true unless: advancedJavascript===false, or trackSearch, or config pg
         imageV2.enabled = (imageV2.imgTbl && imageV2.imgTbl.length > 0);
 
         // jQuery load function with stuff to support drag selection in track img
         if (theClient.isSafari()) {
             // Safari has the following bug: if we update the hgTracks map dynamically,
             // the browser ignores the changes (even though if you look in the DOM the changes
             // are there). So we have to do a full form submission when the user changes
             // visibility settings or track configuration.
             // As of 5.0.4 (7533.20.27) this is problem still exists in safari.
             // As of 5.1 (7534.50) this problem appears to have been fixed - unfortunately,
             // logs for 7/2011 show vast majority of safari users are pre-5.1 (5.0.5 is by far
             // the most common).
+            // KRR/JAT:
+            // As of 9.0.9, possibly earlier, the 3rd part of the version is included in the
+            // user agent string, so must be parsed out (and discarded)
             //
             // Early versions of Chrome had this problem too, but this problem went away
             // as of Chrome 5.0.335.1 (or possibly earlier).
             imageV2.mapIsUpdateable = false;
-            var reg = new RegExp("Version\/([0-9]+.[0-9]+) Safari");
+            var reg = new RegExp("Version\/([0-9]+.[0-9]+)(.[0-9]+)? Safari");
             var a = reg.exec(navigator.userAgent);
             if (a && a[1]) {
                 var version = Number(a[1]);
                 if (version >= 5.1) {
                     imageV2.mapIsUpdateable = true;
                 }
             }
         }
         imageV2.inPlaceUpdate = hgTracks.inPlaceUpdate && imageV2.mapIsUpdateable;
     }
 }
 
   /////////////////////////////////////
  ////////// Genomic position /////////
 /////////////////////////////////////
@@ -3470,31 +3473,31 @@
             resizable: true,               // Let description scroll vertically
             height: (popUp.trackDescriptionOnly ? popMaxHeight : 'auto'),
             width: popWidth,
             minHeight: 200,
             minWidth: 400,
             maxHeight: popMaxHeight,
             maxWidth: popMaxWidth,
             modal: true,
             closeOnEscape: true,
             autoOpen: false,
 
             buttons: { 
                     'Apply': function () {
                          popUp.uiDialogOk($('#pop'), popUp.trackName);
                          // thanks to JAT for this cleverness to keep button functioning
-                         //popUp.saveAllVars = getAllVars( $('#hgTrackUiDialog'), popUp.trackName);
+                         popUp.saveAllVars = getAllVars( $('#hgTrackUiDialog'), popUp.trackName);
                     },
                     'OK': function() {
                         if ( ! popUp.trackDescriptionOnly )
                             popUp.uiDialogOk($('#pop'), popUp.trackName);
                         $(this).dialog("close");
                     }
             },
             // popup.ready() doesn't seem to work in open.
             
             open: function () {
                 if ( ! popUp.trackDescriptionOnly ) {
                     $('#hgTrackUiDialog').find('.filterBy,.filterComp').each(
                         function(i) {
                             if ($(this).hasClass('filterComp'))
                                 ddcl.setup(this);