56a7273c583fc9e4086919faa7cb2a5f29657bce tdreszer Mon Oct 25 13:56:00 2010 -0700 Made bg image of blue guidelines a reusable file so browsers can cache it. Made trackSearch dependent upon advanced javascript features. diff --git src/hg/lib/searchTracks.c src/hg/lib/searchTracks.c index 46e0532..29a776b 100644 --- src/hg/lib/searchTracks.c +++ src/hg/lib/searchTracks.c @@ -1,27 +1,31 @@ // Track Search code which is shared between different CGIs #include "searchTracks.h" #include "hdb.h" #include "hgConfig.h" #include "trix.h" #include "subText.h" +#include "jsHelper.h" void getSearchTrixFile(char *database, char *buf, int len) // Fill-in the name of the track search trix file { char *trixPath = cfgOptionDefault("browser.trixPath", "/gbdb/$db/trackDb.ix"); struct subText *subList = subTextNew("$db", database); subTextStatic(subList, trixPath, buf, len); } -boolean isSearchTracksSupported(char *database) -// Return TRUE if searchTracks is supported for this database +boolean isSearchTracksSupported(char *database, struct cart *cart) +// Return TRUE if searchTracks is supported for this database and javascript is supported too { #ifdef TRACK_SEARCH +if (!advancedJavascriptFeaturesEnabled(cart)) + return FALSE; + char trixFile[HDB_MAX_PATH_STRING]; getSearchTrixFile(database, trixFile, sizeof(trixFile)); return fileExists(trixFile); #else return FALSE; #endif }