578933212e6c900f4cda77f4d9cd1e7d01b9ace1 kate Thu Nov 3 16:09:25 2016 -0700 Initialize tissues from cart. refs #17369 diff --git src/hg/hgGtexTrackSettings/hgGtexTrackSettings.c src/hg/hgGtexTrackSettings/hgGtexTrackSettings.c index 6d4e87b..20b1efe 100644 --- src/hg/hgGtexTrackSettings/hgGtexTrackSettings.c +++ src/hg/hgGtexTrackSettings/hgGtexTrackSettings.c @@ -82,30 +82,33 @@ " " "
" "
" "
GO
" " " "
" "
" " " ); } static void printTissueTable() /* Output HTML with tissue labels and colors, in 2 columns, to fit next to body map */ { struct gtexTissue *tis, *tissues = gtexGetTissues(version); +char var[512]; +safef(var, sizeof var, "%s.%s", tdb->track, GTEX_TISSUE_SELECT); +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( " " "
" "
Tissues
" "
" " Click label below or in Body Map to set or clear a tissue" "
" "
" @@ -116,33 +119,35 @@ ); puts(""); puts(""); for (tis = tissues; tis != NULL; tis = tis->next) { if (tis->id < last) i = tis->id * 2; else i = (tis->id - last) * 2 + 1; tisTable[i] = tis; } for (i=0; iname) != NULL); printf("" - "", - tis->color, tis->name, tis->description); + "", + tis->color, + isChecked ? "tissueSelected" : "", tis->name, tis->description); col++; if (col > cols-1) { puts("\n"); col = 0; } } puts("\n"); puts("
%s%s
"); } static void printBodyMap() { puts( " "