6925dfc572306b7e65f3104ebd232f62ca7f11d5 larrym Wed Oct 19 12:27:48 2011 -0700 remove use of advancedJavascriptFeaturesEnabled config (see redmine #5283); remove NEW_JQUERY cruft diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index f09c1ab..df075e4 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -2516,36 +2516,33 @@ if(theImgBox) { // Set imgTrack in case any map items will be set sliceHeight = trackPlusLabelHeight(track, fontHeight); sliceOffsetY = y; curImgTrack = imgBoxTrackFind(theImgBox,track->tdb,NULL); } y = doTrackMap(track, hvg, y, fontHeight, trackPastTabX, trackPastTabWidth); } } /* Finish map. */ hPrintf("</MAP>\n"); jsonHashAddBoolean(jsonForClient, "dragSelection", dragZooming); -jsonHashAddBoolean(jsonForClient, "inPlaceUpdate", IN_PLACE_UPDATE && advancedJavascriptFeaturesEnabled(cart)); +jsonHashAddBoolean(jsonForClient, "inPlaceUpdate", IN_PLACE_UPDATE); -if(rulerClickHeight) - { jsonHashAddNumber(jsonForClient, "rulerClickHeight", rulerClickHeight); - } if(newWinWidth) { jsonHashAddNumber(jsonForClient, "newWinWidth", newWinWidth); } /* Save out picture and tell html file about it. */ if(hvgSide != hvg) hvGfxClose(&hvgSide); hvGfxClose(&hvg); #ifdef SUPPORT_CONTENT_TYPE char *type = cartUsualString(cart, "hgt.contentType", "html"); if(sameString(type, "jsonp")) { struct jsonHashElement *json = newJsonHash(newHash(8)); @@ -4674,35 +4671,31 @@ 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()); jsonHashAddNumber(jsonForClient, "insideX", insideX); jsonHashAddBoolean(jsonForClient, "revCmplDisp", revCmplDisp); -#ifdef NEW_JQUERY 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 (hPrintStatus()) 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) measureTime("Time before getTrackList"); trackList = getTrackList(&groupList, defaultTracks ? -1 : -2); @@ -4725,31 +4718,31 @@ /* Honor hideAll and visAll variables */ if (hideAll || defaultTracks) { int vis = (hideAll ? tvHide : -1); changeTrackVis(groupList, NULL, vis); } /* Before loading items, deal with the next/prev item arrow buttons if pressed. */ if (cgiVarExists("hgt.nextItem")) doNextPrevItem(TRUE, cgiUsualString("hgt.nextItem", NULL)); else if (cgiVarExists("hgt.prevItem")) doNextPrevItem(FALSE, cgiUsualString("hgt.prevItem", NULL)); -if(advancedJavascriptFeaturesEnabled(cart) && !psOutput && !cartUsualBoolean(cart, "hgt.imageV1", FALSE)) +if(!psOutput && !cartUsualBoolean(cart, "hgt.imageV1", FALSE)) { // Start an imagebox (global for now to avoid huge rewrite of hgTracks) // Set up imgBox dimensions int sideSliceWidth = 0; // Just being explicit if (withLeftLabels) sideSliceWidth = (insideX - gfxBorder*3) + 2; theImgBox = imgBoxStart(database,chromName,winStart,winEnd,(!revCmplDisp),sideSliceWidth,tl.picWidth); #ifdef IMAGEv2_DRAG_SCROLL // Define a portal with a default expansion size, then set the global dimensions to the full image size if(imgBoxPortalDefine(theImgBox,&winStart,&winEnd,&(tl.picWidth),0)) { winBaseCount = winEnd - winStart; insideWidth = tl.picWidth-gfxBorder-insideX; } #endif//def IMAGEv2_DRAG_SCROLL @@ -5017,49 +5010,43 @@ hWrites(" "); hButton("hgTracksConfigPage", "configure"); if (survey && differentWord(survey, "off")) hPrintf(" <span style='background-color:yellow;'><A HREF='%s' TARGET=_BLANK><EM><B>%s</EM></B></A></span>\n", survey, surveyLabel ? surveyLabel : "Take survey"); hPutc('\n'); } } /* Make chromsome ideogram gif and map. */ makeChromIdeoImage(&trackList, psOutput, ideoTn); #ifdef USE_NAVIGATION_LINKS hPrintf("<TABLE BORDER=0 CELLPADDING=0 width='%d'><tr style='font-size:small;'>\n",tl.picWidth);//min(tl.picWidth, 800)); hPrintf("<td width='40' align='left'><a href='?hgt.left3=1' title='move 95% to the left'><<<</a>\n"); hPrintf("<td width='30' align='left'><a href='?hgt.left2=1' title='move 47.5% to the left'><<</a>\n"); - #ifdef IMAGEv2_DRAG_SCROLL - if(!advancedJavascriptFeaturesEnabled(cart)) - #endif//def IMAGEv2_DRAG_SCROLL hPrintf("<td width='20' align='left'><a href='?hgt.left1=1' title='move 10% to the left'><</a>\n"); hPrintf("<td> </td>\n"); // Without 'width=' this cell expand to table with, forcing other cells to the sides. hPrintf("<td width='40' align='left'><a href='?hgt.in1=1' title='zoom in 1.5x'>> <</a>\n"); hPrintf("<td width='60' align='left'><a href='?hgt.in2=1' title='zoom in 3x'>>> <<</a>\n"); hPrintf("<td width='80' align='left'><a href='?hgt.in3=1' title='zoom in 10x'>>>> <<<</a>\n"); hPrintf("<td width='40' align='left'><a href='?hgt.inBase=1' title='zoom in to base range'>><i>base</i><</a>\n"); hPrintf("<td> </td>\n"); // Without 'width=' this cell expand to table with, forcing other cells to the sides. hPrintf("<td width='40' align='right'><a href='?hgt.out1=1' title='zoom out 1.5x'>< ></a>\n"); hPrintf("<td width='60' align='right'><a href='?hgt.out2=1' title='zoom out 3x'><< >></a>\n"); hPrintf("<td width='80' align='right'><a href='?hgt.out3=1' title='zoom out 10x'><<< >>></a>\n"); hPrintf("<td> </td>\n"); // Without 'width=' this cell expand to table with, forcing other cells to the sides. - #ifdef IMAGEv2_DRAG_SCROLL - if(!advancedJavascriptFeaturesEnabled(cart)) - #endif//ndef IMAGEv2_DRAG_SCROLL hPrintf("<td width='20' align='right'><a href='?hgt.right1=1' title='move 10% to the right'>></a>\n"); hPrintf("<td width='30' align='right'><a href='?hgt.right2=1' title='move 47.5% to the right'>>></a>\n"); hPrintf("<td width='40' align='right'><a href='?hgt.right3=1' title='move 95% to the right'>>>></a>\n"); hPrintf("</tr></table>\n"); #endif//def USE_NAVIGATION_LINKS /* Make clickable image and map. */ makeActiveImage(trackList, psOutput); fflush(stdout); if(trackImgOnly) { // bail out b/c we are done if (measureTiming) @@ -5941,84 +5928,75 @@ if (hIsGisaidServer()) { validateGisaidUser(cart); } setUdcCacheDir(); int timeout = cartUsualInt(cart, "udcTimeout", 300); if (udcCacheTimeout() < timeout) udcSetCacheTimeout(timeout); initTl(); char *configPageCall = cartCgiUsualString(cart, "hgTracksConfigPage", "notSet"); -dragZooming = advancedJavascriptFeaturesEnabled(cart); +dragZooming = TRUE; /* 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 ??? } jsonForClient = newJsonHash(newHash(8)); jsonHashAddString(jsonForClient, "cgiVersion", CGI_VERSION); boolean searching = differentString(cartUsualString(cart, TRACK_SEARCH,"0"), "0"); if(!trackImgOnly) { // Write out includes for css and js files hWrites(commonCssStyles()); jsIncludeFile("jquery.js", NULL); jsIncludeFile("jquery-ui.js", NULL); jsIncludeFile("utils.js", NULL); jsIncludeFile("ajax.js", NULL); if(dragZooming && !searching) { jsIncludeFile("jquery.imgareaselect.js", NULL); -#ifndef NEW_JQUERY - webIncludeResourceFile("autocomplete.css"); - jsIncludeFile("jquery.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 (!searching) // NOT doing search { webIncludeResourceFile("jquery.contextmenu.css"); jsIncludeFile("jquery.contextmenu.js", NULL); webIncludeResourceFile("ui.dropdownchecklist.css"); jsIncludeFile("ui.dropdownchecklist.js", NULL); -#ifdef NEW_JQUERY jsIncludeFile("ddcl.js", NULL); -#endif///def NEW_JQUERY - } } 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")) {