774cdab50f95e18aad73b455a907158c44f76f9e kate Mon Apr 3 16:49:52 2017 -0700 Fix twitchy layout of vis drop-down (lose bolding of Go, seemed a bit excessive anyway). Add pointer cursor to drop-down while the hood is up. refs #18556 diff --git src/hg/hgGtexTrackSettings/hgGtexTrackSettings.c src/hg/hgGtexTrackSettings/hgGtexTrackSettings.c index 1dd7c0b..7b24767 100644 --- src/hg/hgGtexTrackSettings/hgGtexTrackSettings.c +++ src/hg/hgGtexTrackSettings/hgGtexTrackSettings.c @@ -8,80 +8,82 @@ #include "cart.h" #include "portable.h" #include "cheapcgi.h" #include "web.h" #include "hCommon.h" #include "hui.h" #include "jsHelper.h" #include "gtexUi.h" #include "gtexInfo.h" #include "gtexTissue.h" /* Global Variables */ struct cart *cart = NULL; /* CGI and other variables */ struct hash *oldVars = NULL; /* Old contents of cart before it was updated by CGI */ +static void printGoButton() +/* HTML for GO button and 'play' icon */ +{ +puts( +"
\n" +"
GO
\n" +" \n" +"
\n" +); +} + +static void printBodyMap() +/* Include BodyMap SVG in HTML */ +{ +puts( +" \n" +" \n" +" GTEx Body Map illustration not found\n" +" \n"); +puts("
Credit: jwestdesign
\n"); +} + static void printTrackHeader(char *db, struct trackDb *tdb) /* Print top banner with track labels */ // TODO: Try to simplify layout { char *assembly = stringBetween("(", ")", hFreezeFromDb(db)); puts( "\n" "
\n" "
\n" ); printf( " \n" " %s Track\n" " %s \n" " " " %s \n" , tdb->shortLabel, assembly, tdb->longLabel); puts( "\n" " \n" " \n" " \n" " \n" " \n" "
\n" "
\n" -"
\n" -"
GO
\n" -" \n" -"
\n" -"
\n" -"
\n"); -} - -static void printBodyMap() -{ -puts( -" \n" -" \n" -" GTEx Body Map illustration not found\n" -" \n"); -puts("
Credit: jwestdesign
\n"); -} - -static void printGoButton() -{ +); +printGoButton(); puts( -"
\n" -"
GO
\n" -" \n" +"
\n" " \n" ); } static void printVisSelect(struct trackDb *tdb) /* Track visibility dropdown */ { enum trackVisibility vis = tdb->visibility; vis = hTvFromString(cartUsualString(cart, tdb->track, hStringFromTv(vis))); boolean canPack = TRUE; hTvDropDownClassVisOnlyAndExtra(tdb->track, vis, canPack, "gbSelect normalText visDD", trackDbSetting(tdb, "onlyVisibility"), NULL); } static void printScoreFilter(struct cart *cart, char *track, struct trackDb *tdb) @@ -93,31 +95,31 @@ int score = cartUsualInt(cart, buf, 0); int minScore = 0, maxScore = 1000; cgiMakeIntVarWithLimits(buf, score, "Minimum score", 0, minScore, maxScore); printf( " (range %d-%d)\n", minScore, maxScore); } static void printConfigPanel(struct trackDb *tdb) /* Controls for track configuration (except for tissues) */ { char *track = tdb->track; puts( " \n" "
\n" "
Configuration
\n" -"
\n"); +"
\n"); /* Track vis dropdown */ printVisSelect(tdb); printGoButton(); puts( "
\n" "
\n"); /* GTEx-specific track controls, layout in 3 rows */ puts( " \n" "
\n" "
\n"); gtexGeneUiGeneLabel(cart, track, tdb); puts( @@ -170,31 +172,31 @@ struct hash *selectedHash = cartHashList(cart, var); struct gtexTissue **tisTable = NULL; int count = slCount(tissues); AllocArray(tisTable, count); int i=0, col=0; int cols = 2; int last = count/2 + 1; puts( " \n" "
\n" "
Tissues
\n" "
\n" " Click label below or in Body Map to set or clear a tissue\n" "
\n" - "
\n" + "
\n" "
set all
\n" "
clear all
\n" "
\n" "
\n" ); puts( "\n"); puts( "\n"); for (tis = tissues; tis != NULL; tis = tis->next) { if (tis->id < last) i = tis->id * 2; else