c36f910c093e47caa21035a3cc16bba46fb30371 braney Wed Jul 17 12:32:22 2024 -0700 add a little widget to let user see aliases. Right now they're in a mouse-over diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index d295624..57b4433 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -8507,30 +8507,42 @@ } hButtonMaybePressed("hgt.toggleRevCmplDisp", "Reverse", revCmplDisp ? "Show forward strand at this location - keyboard shortcut: r, then v" : "Show reverse strand at this location - keyboard shortcut: r, then v", NULL, revCmplDisp); hPrintf(" "); hButtonWithOnClick("hgt.setWidth", "Resize", "Resize image width to browser window size - keyboard shortcut: r, then s", "hgTracksSetWidth()"); // put the track download interface behind hg.conf control if (cfgOptionBooleanDefault("showDownloadUi", TRUE)) jsInline("var showDownloadButton = true;\n"); } +static void printAliases(char *name) +/* Print out the aliases for this sequence. */ +{ +struct slName *names = chromAliasFindAliases(name); + +printf("<div id='aliases'><a title='"); +for(;names; names = names->next) + printf("%s;",names->name); +printf("'>Aliases</a></div>"); +} + + void doTrackForm(char *psOutput, struct tempName *ideoTn) /* Make the tracks display form with the zoom/scroll buttons and the active * image. If the ideoTn parameter is not NULL, it is filled in if the * ideogram is created. */ { int disconCount = 0; struct group *group; struct track *track; char *freezeName = NULL; boolean hideAll = cgiVarExists("hgt.hideAll"); boolean hideTracks = cgiOptionalString( "hideTracks") != NULL; boolean defaultTracks = cgiVarExists("hgt.reset"); boolean showedRuler = FALSE; boolean showTrackControls = cartUsualBoolean(cart, "trackControlsOnMain", TRUE); boolean multiRegionButtonTop = cfgOptionBooleanDefault(MULTI_REGION_CFG_BUTTON_TOP, TRUE); @@ -9219,30 +9231,31 @@ pressedClass = "pressed"; showVirtRegions = "show multi-region position ranges and "; } hPrintf("<span class='positionDisplay %s' id='positionDisplay' " "title='click to %s copy chromosome range to input box'>%s</span>", pressedClass, showVirtRegions, addCommasToPos(database, position)); hPrintf("<input type='hidden' name='position' id='position' value='%s'>\n", buf); sprintLongWithCommas(buf, virtWinEnd - virtWinStart); hPrintf(" <span id='size'>%s</span> bp. ", buf); hPrintf("<input class='positionInput' type='text' name='hgt.positionInput' id='positionInput'" " size='%d'>\n", multiRegionButtonTop ? 51 : 61); hWrites(" "); hButton("goButton", "Search"); printSearchHelpLink(); + printAliases(displayChromName); printPatchNote(); if (!trackHubDatabase(database)) { jsonObjectAdd(jsonForClient, "assemblySupportsGeneSuggest", newJsonBoolean(assemblySupportsGeneSuggest(database))); if (assemblySupportsGeneSuggest(database)) hPrintf("<input type='hidden' name='hgt.suggestTrack' id='suggestTrack' value='%s'>\n", assemblyGeneSuggestTrack(database)); } // hg.conf controlled links // database-specific link: 2 hg.conf settings, format <db>_TopLink{Label} struct slName *dbLinks = cfgNamesWithPrefix(database);