b8441cbcbe608abd3fa526418f79c9d3f9cbc38c chmalee Thu Sep 17 11:02:37 2026 -0700 Make hgCustom genome search box selection re-submit the form so you land on the management page if you already had custom tracks on the newly selected assemlby, refs #38372 diff --git src/hg/hgCustom/hgCustom.c src/hg/hgCustom/hgCustom.c index 5b01d71963f..d1d422fbc89 100644 --- src/hg/hgCustom/hgCustom.c +++ src/hg/hgCustom/hgCustom.c @@ -203,31 +203,45 @@ { /* Print genome search bar and selected genome label */ puts("\n"); printf("\n"); printf("\n"); printf("\n"); puts("
\n"); // hgCustom requires this be created to go along with form submission, we // will change it when a genome is selected in the search bar printf("\n", database); jsIncludeAutoCompleteLibs(); char *searchBarId = "genomeSearch"; printGenomeSearchBar(searchBarId, "Search any species, genome or assembly name", NULL, TRUE, "Change selected genome:", NULL); jsInlineF( "setupGenomeSearchBar({\n" " inputId: '%s',\n" " onSelect: function(item) {\n" - " document.mainForm.db.value = item.genome;\n" + " let db = dbFromRecentItem(item);\n" + " if (item.hubUrl) {\n" + " let hubUrlInp = document.createElement(\"input\");\n" + " hubUrlInp.name = \"hubUrl\";\n" + " hubUrlInp.type = \"hidden\";\n" + " hubUrlInp.value = item.hubUrl;\n" + " let genomeInp = document.createElement(\"input\");\n" + " genomeInp.name = \"genome\";\n" + " genomeInp.type = \"hidden\";\n" + " genomeInp.value = item.genome;\n" + " document.mainForm.appendChild(genomeInp);\n" + " document.mainForm.appendChild(hubUrlInp);\n" + " }\n" + " document.mainForm.db.value = db;\n" + " document.mainForm.submit();\n" " }\n" "});\n" , searchBarId ); printf("\n"); char *dbLabel = getCurrentGenomeLabel(database); printf("Current Genome: %s\n", dbLabel); printf("
\n"); } /* intro text */ puts("

"); if (isUpdateForm)