70ef68d210fa4b76c16f7b8e8142a8180f75052a
tdreszer
  Fri Jun 17 20:14:06 2011 -0700
Big checkin of jquery 1.5.1, jquery-ui 1.8 and ui-dropdownchecklist 1.3.  Needs more testing and CSS work.  DDCL is working on FF, Chrome and IE.  Both Chrome and IE support required tiny changes to the DDCL wigit code.  DDCL may still have problems with IE.  Other jquery wigits have been tested at a cursory level and work fine.  Ajax calls may need an extrat dataType: html param.  Dialog (popup) needs CSS tuning.
diff --git src/hg/hgFileSearch/hgFileSearch.c src/hg/hgFileSearch/hgFileSearch.c
index a305083..1eaa456 100644
--- src/hg/hgFileSearch/hgFileSearch.c
+++ src/hg/hgFileSearch/hgFileSearch.c
@@ -431,32 +431,37 @@
 cartWebStart(cart, db, "Search for " FILE_SEARCH_WHAT " in the %s %s Assembly", organism, hFreezeFromDb(db));
 
 // This cleverness allows us to have the background image like "Track Search" does, without all the hgTracks overhead
 printf("<style type='text/css'>body {background-image:url('%s');}</style>",hBackgroundImage());
 
 webIncludeResourceFile("HGStyle.css");
 webIncludeResourceFile("jquery-ui.css");
 webIncludeResourceFile("ui.dropdownchecklist.css");
 jsIncludeFile("jquery.js", NULL);
 jsIncludeFile("jquery-ui.js", NULL);
 //jsIncludeFile("ui.core.js",NULL);   // NOTE: This appears to be not needed as long as jquery-ui.js comes before ui.dropdownchecklist.js
 jsIncludeFile("ui.dropdownchecklist.js",NULL);
 jsIncludeFile("utils.js",NULL);
 
 // This line is needed to get the multi-selects initialized
-//printf("<script type='text/javascript'>$(document).ready(function() { setTimeout('updateMetaDataHelpLinks(0);',50);  $('.filterBy').each( function(i) { $(this).dropdownchecklist({ firstItemChecksAll: true, noneIsAll: true, maxDropHeight: filterByMaxHeight(this) });});});</script>\n");
+#ifdef NEW_JQUERY
+printf("<script type='text/javascript'>var newJQuery=true;</script>\n");
+printf("<script type='text/javascript'>$(document).ready(function() { updateMetaDataHelpLinks(0);  $('.filterBy').each( function(i) { ddclSetup(this,'noneIsAll') });});</script>\n");
+#else///ifndef NEW_JQUERY
+printf("<script type='text/javascript'>var newJQuery=false;</script>\n");
 printf("<script type='text/javascript'>$(document).ready(function() { updateMetaDataHelpLinks(0);  $('.filterBy').each( function(i) { $(this).dropdownchecklist({ firstItemChecksAll: true, noneIsAll: true, maxDropHeight: filterByMaxHeight(this) });});});</script>\n");
+#endif///ndef NEW_JQUERY
 
 doFileSearch(db,organism,cart,tdbList);
 
 
 printf("<BR>\n");
 webEnd();
 }
 
 char *excludeVars[] = { "submit", "Submit", "g", "ajax", FILE_SEARCH,TRACK_SEARCH_ADD_ROW,TRACK_SEARCH_DEL_ROW};  // HOW IS 'ajax" going to be supported?
 
 int main(int argc, char *argv[])
 /* Process command line. */
 {
 cgiSpoof(&argc, argv);
 htmlSetBackground(hBackgroundImage());