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("\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("
\n\n", hgTracksName()); jsonHashAddNumber(jsonForClient, "insideX", insideX); jsonHashAddBoolean(jsonForClient, "revCmplDisp", revCmplDisp); -#ifdef NEW_JQUERY hPrintf("\n"); -#else///ifndef NEW_JQUERY -hPrintf("\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("  %s\n", survey, surveyLabel ? surveyLabel : "Take survey"); hPutc('\n'); } } /* Make chromsome ideogram gif and map. */ makeChromIdeoImage(&trackList, psOutput, ideoTn); #ifdef USE_NAVIGATION_LINKS hPrintf("\n",tl.picWidth);//min(tl.picWidth, 800)); hPrintf("\n"); // Without 'width=' this cell expand to table with, forcing other cells to the sides. hPrintf("\n"); // Without 'width=' this cell expand to table with, forcing other cells to the sides. hPrintf("\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("
<<<\n"); hPrintf("<<\n"); - #ifdef IMAGEv2_DRAG_SCROLL - if(!advancedJavascriptFeaturesEnabled(cart)) - #endif//def IMAGEv2_DRAG_SCROLL hPrintf("<\n"); hPrintf(" > <\n"); hPrintf(">> <<\n"); hPrintf(">>> <<<\n"); hPrintf(">base<\n"); hPrintf(" < >\n"); hPrintf("<< >>\n"); hPrintf("<<< >>>\n"); hPrintf(" >\n"); hPrintf(">>\n"); hPrintf(">>>\n"); hPrintf("
\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("\n"); // XXXX stole this and '.hidden' from bioInt.css - needs work hPrintf("\n"); } /* check for new data hub */ if (cartVarExists(cart, hgHubDataText)) { addDataHubs(cart); } if (cartVarExists(cart, "chromInfoPage")) {