c5f80ca5df4c7e1161dbbb63bd631f81c7f0b64b
tdreszer
  Wed Oct 5 09:41:57 2011 -0700
Cleaned up old 'newJQuery' dependencies.  We are always running as newJQuery now.
diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js
index 196075f..3e34a2c 100644
--- src/hg/js/hgTracks.js
+++ src/hg/js/hgTracks.js
@@ -1474,68 +1474,54 @@
     // and will reload the image if necessary.
     // NOTE: this is needed for IE but other browsers can detect the dirty page much earlier
     if (isDirtyPage()) {
         // mark as non dirty to avoid infinite loop in chrome.
         $('#dirty').val('false');
         jQuery('body').css('cursor', 'wait');
             window.location = "../cgi-bin/hgTracks?hgsid=" + getHgsid();
             return false;
     }
     initVars();
     var db = getDb();
     if(jQuery.fn.autocomplete && $('input#suggest') && db) {
         if(jQuery.fn.Watermark) {
             $('#suggest').Watermark("gene");
         }
-        if(newJQuery) {
             $('input#suggest').autocomplete({
                                                 delay: 500,
                                                 minLength: 2,
-                                                source: ajaxGet(function () {return getDb();}, new Object, true),
+            source: ajaxGet(function () {return getDb();}, new Object),
                                                 open: function(event, ui) {
                                                     var pos = $(this).offset().top + $(this).height();
                                                     if (!isNaN(pos)) {
                                                         var maxHeight = $(window).height() - pos - 30;  // take off a little more because IE needs it
                                                         var auto = $('.ui-autocomplete');
                                                         var curHeight = $(auto).children().length * 21;
                                                         if (curHeight > maxHeight)
                                                             $(auto).css({maxHeight: maxHeight+'px',overflow:'scroll'});
                                                         else
                                                             $(auto).css({maxHeight: 'none',overflow:'hidden'});
                                                     }
                                                 },
                                                 select: function (event, ui) {
                                                         setPosition(ui.item.id, commify(getSizeFromCoordinates(ui.item.id)));
                                                         makeSureSuggestTrackIsVisible();
                                                         // jQuery('body').css('cursor', 'wait');
                                                         // document.TrackHeaderForm.submit();
                                                     }
                                             });
 
-        } else {
-            $('input#suggest').autocomplete({
-                                                delay: 500,
-                                                minchars: 2,
-                                                ajax_get: ajaxGet(function () {return db;}, new Object, false),
-                                                callback: function (obj) {
-                                                    setPosition(obj.id, commify(getSizeFromCoordinates(obj.id)));
-                                                    makeSureSuggestTrackIsVisible();
-                                                    // jQuery('body').css('cursor', 'wait');
-                                                    // document.TrackHeaderForm.submit();
-                                                }
-                                            });
-        }
         // I want to set focus to the suggest element, but unforunately that prevents PgUp/PgDn from
         // working, which is a major annoyance.
         // $('input#suggest').focus();
     }
 
     if(jQuery.jStore) {
         // Experimental code to handle "user hits back button" problem by reloading the page based on the user's cart
         if(jQuery.browser.msie && jQuery.browser.version < 8) {
             // IE 7 requires flash to support jStore.
             jQuery.extend(jQuery.jStore.defaults, {
                               project: 'hgTracks',
                               engine: 'flash',
                               flash: '/jStore.Flash.html'
                           });
         }
@@ -2563,39 +2549,30 @@
         $.getScript(file); // Should protect against already loaded files.
     }); */
     /* //in open ?  Loads fine, but then dialog gets confused
     $(jsFiles).each(function (i) {
         bix = "<script type='text/javascript' SRC='".length;
         eix = this.lastIndexOf("'></script>");
         file = this.substring(bix,eix);
         //$.getScript(file,function(data) { warn(data.substring(0,20) + " loaded")});
     });*/
 
     if( ! popUpTrackDescriptionOnly ) {
         var subtrack = tdbIsSubtrack(hgTracks.trackDb[popUpTrackName]) ? popUpTrackName :"";  // If subtrack then vis rules differ
         popSaveAllVars = getAllVars( $('#hgTrackUiDialog'), subtrack );  // Saves the vars that may get changed by the popup cfg.
 
         // -- popup.ready() -- Here is the place to do things that might otherwise go into a $('#pop').ready() routine!
-        if (!newJQuery) {
-            $('#hgTrackUiDialog').find('.filterComp').each( function(i) { // Do this by 'each' to set noneIsAll individually
-                $(this).dropdownchecklist({ firstItemChecksAll: true,
-                        noneIsAll: $(this).hasClass('filterBy'),
-                        maxDropHeight: filterByMaxHeight(this),
-                        emptyText: "Please select ...",
-                        textFormatFunction: ddclTextFormatter });
-            });
-        }
     }
 
     // Searching for some selblance of size suitability
     var popMaxHeight = ($(window).height() - 40);
     var popMaxWidth  = ($(window).width() - 40);
     var popWidth     = 740;
     if (popWidth > popMaxWidth)
         popWidth > popMaxWidth;
 
     $('#hgTrackUiDialog').dialog({
                                ajaxOptions: {
                                    // This doesn't work
                                    cache: true
                                },
                                resizable: true,
@@ -2607,40 +2584,38 @@
                                maxWidth: popMaxWidth,
                                modal: true,
                                closeOnEscape: true,
                                autoOpen: false,
                                buttons: { "OK": function() {
                                     if( ! popUpTrackDescriptionOnly )
                                         hgTrackUiPopCfgOk($('#pop'), popUpTrackName);
                                     $(this).dialog("close");
                                }},
                                // popup.ready() doesn't seem to work in open.  So there is no need for open at this time.
                                //open: function() {
                                //     var subtrack = tdbIsSubtrack(hgTracks.trackDb[popUpTrackName]) ? popUpTrackName :"";  // If subtrack then vis rules differ
                                //     popSaveAllVars = getAllVars( $('#pop'), subtrack );
                                //},
                                open: function () {
-                                    if (newJQuery) {
                                         if( ! popUpTrackDescriptionOnly ) {
                                             $('#hgTrackUiDialog').find('.filterBy,.filterComp').each( function(i) {
                                                 if ($(this).hasClass('filterComp'))
                                                     ddcl.setup(this);
                                                 else
                                                     ddcl.setup(this, 'noneIsAll');
                                             });
                                         }
-                                    }
                                },
                                close: function() {
                                    popUpBoxCleanup();
                                }
                            });
     // FIXME: Why are open and close no longer working!!!
     if(popUpTrackDescriptionOnly) {
         var myWidth =  $(window).width() - 300;
         if(myWidth > 900)
             myWidth = 900;
         $('#hgTrackUiDialog').dialog("option", "maxWidth", myWidth);
         $('#hgTrackUiDialog').dialog("option", "width", myWidth);
         $('#hgTrackUiDialog').dialog('option' , 'title' , hgTracks.trackDb[popUpTrackName].shortLabel + " Track Description");
         $('#hgTrackUiDialog').dialog('open');
         var buttOk = $('button.ui-state-default');