47ea57080b515e5dad5f658c58feb8944a7e7d61 chmalee Thu Jan 29 15:30:26 2026 -0800 Replace clade/assembly dropdowns with a search bar on most CGIs. Add a recents list to hgGateway and to the species bar and to the 'Genomes' dropdown menu. Track recently selected species in localStorage. Add toGenome and fromGenome arguemnts to hubApi/liftOver in order to find appropriate liftover assemblies, refs #36232 diff --git src/hg/hgTables/mainPage.c src/hg/hgTables/mainPage.c index f581cf8d5c0..6fa746e9894 100644 --- src/hg/hgTables/mainPage.c +++ src/hg/hgTables/mainPage.c @@ -13,98 +13,58 @@ #include "textOut.h" #include "jksql.h" #include "hdb.h" #include "web.h" #include "jsHelper.h" #include "hui.h" #include "hgColors.h" #include "trackDb.h" #include "grp.h" #include "hgTables.h" #include "joiner.h" #include "trackDb.h" #include "hubConnect.h" #include "trackHub.h" #include "hgConfig.h" +#include "jsHelper.h" static struct dyString *onChangeStart() /* Start up a javascript onChange command */ { struct dyString *dy = jsOnChangeStart(); jsDropDownCarryOver(dy, hgtaTrack); jsDropDownCarryOver(dy, hgtaGroup); jsTrackedVarCarryOver(dy, hgtaRegionType, "regionType"); jsTextCarryOver(dy, hgtaRange); jsDropDownCarryOver(dy, hgtaOutputType); jsTextCarryOver(dy, hgtaOutFileName); return dy; } -static char *onChangeClade() -/* Return javascript executed when they change clade. */ -{ -struct dyString *dy = onChangeStart(); -jsDropDownCarryOver(dy, "clade"); -jsDropDownCarryOver(dy, hgtaTable); -dyStringAppend(dy, " document.hiddenForm.org.value=0;"); -dyStringAppend(dy, " document.hiddenForm.db.value=0;"); -dyStringAppend(dy, " document.hiddenForm.position.value='';"); -return jsOnChangeEnd(&dy); -} - -static char *onChangeOrg() -/* Return javascript executed when they change organism. */ -{ -struct dyString *dy = onChangeStart(); -jsDropDownCarryOver(dy, "clade"); -jsDropDownCarryOver(dy, "org"); -jsDropDownCarryOver(dy, hgtaTable); -dyStringAppend(dy, " document.hiddenForm.db.value=0;"); -dyStringAppend(dy, " document.hiddenForm.position.value='';"); -return jsOnChangeEnd(&dy); -} - -static char *onChangeDb() -/* Return javascript executed when they change database. */ -{ -struct dyString *dy = onChangeStart(); -jsDropDownCarryOver(dy, "clade"); -jsDropDownCarryOver(dy, "db"); -jsDropDownCarryOver(dy, hgtaTable); -dyStringAppend(dy, " document.hiddenForm.position.value='';"); -return jsOnChangeEnd(&dy); -} - static char *onChangeGroupOrTrack() /* Return javascript executed when they change group. */ { struct dyString *dy = onChangeStart(); -jsDropDownCarryOver(dy, "clade"); -jsDropDownCarryOver(dy, "db"); -jsDropDownCarryOver(dy, "org"); dyStringPrintf(dy, " document.hiddenForm.%s.value=0;", hgtaTable); return jsOnChangeEnd(&dy); } static char *onChangeTable() /* Return javascript executed when they change group. */ { struct dyString *dy = onChangeStart(); -jsDropDownCarryOver(dy, "clade"); -jsDropDownCarryOver(dy, "db"); -jsDropDownCarryOver(dy, "org"); jsDropDownCarryOver(dy, hgtaTable); return jsOnChangeEnd(&dy); } void makeRegionButtonExtraHtml(char *val, char *selVal, char *extraHtml) /* Make region radio button including a little Javascript to save selection state * and optional extra html attributes. */ { jsMakeTrackingRadioButtonExtraHtml(hgtaRegionType, "regionType", val, selVal, extraHtml); } void makeRegionButton(char *val, char *selVal) /* Make region radio button including a little Javascript * to save selection state. */ { @@ -670,58 +630,62 @@ hPrintf("Note: This track is unavailable for genome-wide download. "); if (noGenomeNote) hPrintf("Reason: %s", noGenomeNote); else hPrintf("Usually, this is due to distribution restrictions of the source database or the size of the track. Please see the track documentation for more details. Contact us if you are still unable to access the data. "); hPrintf(""); } void showMainControlTable(struct sqlConnection *conn) /* Put up table with main controls for main page. */ { struct grp *selGroup; boolean isWig = FALSE, isPositional = FALSE, isMaf = FALSE, isBedGr = FALSE, isChromGraphCt = FALSE, isPal = FALSE, isArray = FALSE, isBam = FALSE, isVcf = FALSE, isHalSnake = FALSE, isLongTabix = FALSE, isHic = FALSE; -boolean gotClade = hGotClade(); +//boolean gotClade = hGotClade(); struct hTableInfo *hti = NULL; hPrintf("