d430ed42b69dc955443169c3ea4f4157ff66fe84 braney Thu Dec 4 10:50:24 2025 -0800 get default hidden hgGene sections to open properly diff --git src/hg/hgGene/hgGene.c src/hg/hgGene/hgGene.c index f8dadd46327..6e356ce5414 100644 --- src/hg/hgGene/hgGene.c +++ src/hg/hgGene/hgGene.c @@ -516,41 +516,38 @@ /* Print each section in turn. */ { struct section *section; for (section = sectionList; section != NULL; section = section->next) { boolean isOpen = sectionIsOpen(section); char *indicator = (isOpen ? "-" : "+"); char *indicatorImg = (isOpen ? "../images/remove.gif" : "../images/add.gif"); struct dyString *header = dyStringNew(0); //keep the following line for future debugging need //printf("
printing %s section\n", section->name);fflush(stdout); dyStringPrintf(header, "", section->name); dyStringPrintf(header, "\"%s\"  ", section->name, indicatorImg, indicator); dyStringAppend(header, section->longLabel); - webNewSection("%s",header->string); if (isOpen) - { + webNewSection("%s",header->string); + else + webNewHiddenSection("%s",header->string); + long startTime = clock1000(); section->print(section, conn, geneId); section->printTime = clock1000() - startTime; - } - else - { - printf("Press \"+\" in the title bar above to open this section."); - } dyStringFree(&header); } // add some simple javascript that can do the collapse/expand section buttons // this code needs to be wrapped in an immediately executable function so that // re-clicks don't complain about previously declared variables jsInlineF("" "(function() {\n" "function collapseSection() {\n" " let toCollapse = this.parentNode.nextElementSibling;\n" " let isHidden = toCollapse.style.display === \"none\";\n" " if (isHidden) {\n" " toCollapse.style = \"display: \";\n" " this.src = \"../images/remove.gif\";\n" " this.alt = \"-\";\n" " } else {\n"