fa3431cd36b16586558586e1ce8e3f4f68136926 chmalee Thu Oct 17 15:00:58 2024 -0700 Make the density graph options div have a unique ID so when you have more than one subtrack configure section open on hgTrackUi, the right options are selected, refs #34651 diff --git src/hg/lib/hui.c src/hg/lib/hui.c index ac94803..be2ea86 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -5986,44 +5986,44 @@ safef(option, sizeof(option), "%s.%s", name, "squishyPackPoint" ); cgiMakeDoubleVarWithLimits(option, squishyPackPoint, "Range min", 0, NO_VALUE, NO_VALUE); } void wigOption(struct cart *cart, char *name, char *title, struct trackDb *tdb) /* let the user choose to see the track in wiggle mode */ { printf("

Display data as a density graph: "); boolean option = cartOrTdbBoolean(cart, tdb, "doWiggle", FALSE); char varName[1024]; safef(varName, sizeof(varName), "%s.doWiggle", name); cgiMakeCheckBox(varName, option); printf("
\n"); char *style = option ? "display:block" : "display:none"; -printf("
\n", style); +printf("
\n", name, style); // we need to fool the wiggle dialog into defaulting to autoscale and maximum char *origType = tdb->type; tdb->type = "bedGraph"; if (hashFindVal(tdb->settingsHash, AUTOSCALE) == NULL) hashAdd(tdb->settingsHash, AUTOSCALE, "on"); if (hashFindVal(tdb->settingsHash, WINDOWINGFUNCTION) == NULL) hashAdd(tdb->settingsHash, WINDOWINGFUNCTION, wiggleWindowingEnumToString( wiggleWindowingMean)); wigCfgUi(cart,tdb,name,title,TRUE); tdb->type = origType; printf("
\n\n"); -jsInlineF("$(\"input[name='%s']\").click( function() { $('#densGraphOptions').toggle();} );\n" - , varName); // XSS FILTER? +jsInlineF("$(\"input[name='%s']\").click( function() { $('#densGraphOptions%s').toggle();} );\n" + , varName, name); // XSS FILTER? } void filterNameOption(struct cart *cart, char *name, struct trackDb *tdb) /* filter by feature names text input box */ { printf("
Show only transcripts with these accessions: "); char varName[1024]; safef(varName, sizeof(varName), "%s.nameFilter", name); char *onlyTransStr = cartUsualString(cart, varName, ""); cgiMakeTextVar(varName, onlyTransStr, 60); printf(" Separate multiple accessions with commas"); puts("
\n\n"); }