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/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index afe77cc..abdaa08 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -4361,32 +4361,34 @@ if (psOutput != NULL) { hPrintDisable(); hideControls = TRUE; withNextItemArrows = FALSE; withNextExonArrows = FALSE; hgFindMatches = NULL; } /* Tell browser where to go when they click on image. */ hPrintf("<FORM ACTION=\"%s\" NAME=\"TrackHeaderForm\" id=\"TrackHeaderForm\" METHOD=\"GET\">\n\n", hgTracksName()); hPrintf("<input type='hidden' id='hgt.insideX' name='insideX' value='%d'>\n", insideX); hPrintf("<input type='hidden' id='hgt.revCmplDisp' name='revCmplDisp' value='%d'>\n", revCmplDisp); #ifdef NEW_JQUERY -hPrintf("<input type='hidden' id='hgt.newJQuery' name='hgt.newJQuery' value='1'>\n"); -#endif +hPrintf("<script type='text/javascript'>var newJQuery=true;</script>\n"); +#else///ifndef NEW_JQUERY +hPrintf("<script type='text/javascript'>var newJQuery=false;</script>\n"); +#endif///ndef NEW_JQUERY if (!psOutput) cartSaveSession(cart); clearButtonJavascript = "document.TrackHeaderForm.position.value=''; document.getElementById('suggest').value='';"; /* See if want to include sequence search results. */ userSeqString = cartOptionalString(cart, "ss"); if (userSeqString && !ssFilesExist(userSeqString)) { userSeqString = NULL; cartRemove(cart, "ss"); } if (!hideControls) hideControls = cartUsualBoolean(cart, "hideControls", FALSE); if (measureTiming) uglyTime("Time before getTrackList"); trackList = getTrackList(&groupList, defaultTracks ? -1 : -2); @@ -5575,64 +5577,65 @@ dragZooming = advancedJavascriptFeaturesEnabled(cart); /* Do main display. */ if (cartUsualBoolean(cart, "hgt.trackImgOnly", FALSE)) { trackImgOnly = TRUE; ideogramToo = cartUsualBoolean(cart, "hgt.ideogramToo", FALSE); hideControls = TRUE; withNextItemArrows = FALSE; withNextExonArrows = FALSE; hgFindMatches = NULL; // XXXX necessary ??? } hWrites(commonCssStyles()); jsIncludeFile("jquery.js", NULL); +jsIncludeFile("jquery-ui.js", NULL); jsIncludeFile("utils.js", NULL); -if(dragZooming) +jsIncludeFile("ajax.js", NULL); +boolean searching = differentString(cartUsualString(cart, TRACK_SEARCH,"0"),"0"); +if(dragZooming && !searching) { jsIncludeFile("jquery.imgareaselect.js", NULL); - jsIncludeFile("ajax.js", NULL); #ifdef NEW_JQUERY webIncludeResourceFile("jquery.ui.autocomplete.css"); -#else +#else///ifndef NEW_JQUERY webIncludeResourceFile("autocomplete.css"); jsIncludeFile("jquery.autocomplete.js", NULL); -#endif - jsIncludeFile("autocomplete.js", NULL); +#endif///ndef NEW_JQUERY } + jsIncludeFile("autocomplete.js", NULL); jsIncludeFile("hgTracks.js", NULL); #ifdef LOWELAB jsIncludeFile("lowetooltip.js", NULL); #endif if(advancedJavascriptFeaturesEnabled(cart)) { webIncludeResourceFile("jquery-ui.css"); - if (sameString(cartUsualString(cart, TRACK_SEARCH,"0"),"0")) // NOT doing search + if (!searching) // NOT doing search { webIncludeResourceFile("jquery.contextmenu.css"); jsIncludeFile("jquery.contextmenu.js", NULL); webIncludeResourceFile("ui.dropdownchecklist.css"); #ifndef NEW_JQUERY jsIncludeFile("ui.core.js", NULL); #endif jsIncludeFile("ui.dropdownchecklist.js", NULL); } } -jsIncludeFile("jquery-ui.js", NULL); //if (!trackImgOnly) { hPrintf("<div id='hgTrackUiDialog' style='display: none'></div>\n"); // XXXX stole this and '.hidden' from bioInt.css - needs work hPrintf("<div id='warning' class='ui-state-error ui-corner-all hidden' style='font-size: 0.75em; display: none;' onclick='$(this).hide();'><p><span class='ui-icon ui-icon-alert' style='float: left; margin-right: 0.3em;'></span><strong></strong><span id='warningText'></span> (click to hide)</p></div>\n"); } /* check for new data hub */ if (cartVarExists(cart, hgHubDataText)) { addDataHubs(cart); } if (cartVarExists(cart, "chromInfoPage"))