564af6b2a9cad65b3e86bb4bc04fd3b5395e0a50 larrym Wed Sep 14 16:29:41 2011 -0700 disable in-place navigation if advanced javascript features is turned off (see redmine 5279) diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index 09e90b7..31b604f 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -2516,57 +2516,57 @@ 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); +jsonHashAddBoolean(jsonForClient, "inPlaceUpdate", IN_PLACE_UPDATE && advancedJavascriptFeaturesEnabled(cart)); 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)); printf("Content-Type: application/json\n\n"); jsonHashAddString(json, "track", cartString(cart, "hgt.trackNameFilter")); jsonHashAddNumber(json, "height", pixHeight); jsonHashAddNumber(json, "width", pixWidth); - jsonHashAddString(json, "src", gifTn.forHtml); + jsonHashAddString(json, "img", gifTn.forHtml); printf("%s(", cartString(cart, "jsonp")); hPrintEnable(); jsonPrint((struct jsonElement *) json, NULL, 0); hPrintDisable(); printf(")\n"); return; } else if(sameString(type, "png")) { // following is (currently dead) experimental code to bypass hgml and return png's directly - see redmine 4888 printf("Content-Disposition: filename=hgTracks.png\nContent-Type: image/png\n\n"); char buf[4096]; FILE *fd = fopen(gifTn.forCgi, "r"); if(fd == NULL)