768289e6cf447f433a89c75856d60a3b018b53aa braney Thu Aug 20 11:00:29 2020 -0700 add trackDb variables to allow the composite parent to forego the settings of the first track, and to show the configuration of a subtrack by default diff --git src/hg/lib/hui.c src/hg/lib/hui.c index ec954b3..c68a3b4 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -5162,30 +5162,35 @@ { char *dateDisplay = encodeRestrictionDate(db,subtrack,FALSE); // includes dates in the past if (dateDisplay) { if (dateIsOld(dateDisplay, MDB_ENCODE_DATE_FORMAT)) printf("</TD>\n<TD align='center' nowrap style='color: #BBBBBB;'> %s ", dateDisplay); else printf("</TD>\n<TD align='center'> %s ", dateDisplay); } } // End of row and free ourselves of this subtrack puts("</TD></TR>\n"); checkBoxIdFree(&id); + + boolean showCfg = trackDbSettingOn(subtrack, "showCfg"); + if (showCfg) + jsInlineF(" subCfg.cfgToggle(document.getElementById(\"%s_toggle\"),\"%s\");", subtrack->track, subtrack->track); + } // End of the table puts("</TBODY>"); dyStringFree(&dyHtml) membersForAllSubGroupsFree(parentTdb,&membersForAll); } static boolean membersHaveMatrix(membersForAll_t *membersForAll) /* Check for matrix */ { if (membersForAll->members[dimX] == NULL && membersForAll->members[dimY] == NULL) return FALSE; return TRUE; } @@ -6362,48 +6367,51 @@ printf("<OPTION %s>%s</OPTION>", sameString(setting, FILTERTEXT_WILDCARD) ? "SELECTED" : "", FILTERTEXT_WILDCARD ); printf("<OPTION %s>%s</OPTION>", sameString(setting, FILTERTEXT_REGEXP) ? "SELECTED" : "", FILTERTEXT_REGEXP ); printf("</SELECT>"); printf("</P>"); } } return count; } void scoreCfgUi(char *db, struct cart *cart, struct trackDb *tdb, char *name, char *title, int maxScore, boolean boxed) // Put up UI for filtering bed track based on a score { char option[256]; +if (cartOptionalString(cart, "ajax") == NULL) + { + webIncludeResourceFile("ui.dropdownchecklist.css"); + jsIncludeFile("ui.dropdownchecklist.js",NULL); + jsIncludeFile("ddcl.js",NULL); + } + boolean parentLevel = isNameAtParentLevel(tdb,name); +if (parentLevel) + if (trackDbSettingOn(tdb->parent, "noParentConfig")) + return; boolean skipScoreFilter = FALSE; // Numeric filters are first boolean isBoxOpened = FALSE; if (numericFiltersShowAll(db, cart, tdb, &isBoxOpened, boxed, parentLevel, name, title) > 0) skipScoreFilter = TRUE; if (textFiltersShowAll(db, cart, tdb)) skipScoreFilter = TRUE; -if (cartOptionalString(cart, "ajax") == NULL) - { - webIncludeResourceFile("ui.dropdownchecklist.css"); - jsIncludeFile("ui.dropdownchecklist.js",NULL); - jsIncludeFile("ddcl.js",NULL); - } - // Add any multi-selects next filterBy_t *filterBySet = filterBySetGet(tdb,cart,name); if (filterBySet != NULL) { if (!tdbIsComposite(tdb) && cartOptionalString(cart, "ajax") == NULL) jsIncludeFile("hui.js",NULL); if (!isBoxOpened) // Note filterBy boxes are not double "boxed", printf("<BR>"); // if there are no other filters filterBySetCfgUi(cart,tdb,filterBySet,TRUE, name); filterBySetFree(&filterBySet); skipScoreFilter = TRUE; } boolean scoreFilterOk = (trackDbSettingClosestToHome(tdb, NO_SCORE_FILTER) == NULL) && !skipScoreFilter;