e14e13c90aa4b8a325f165d44bca1035cd111bb8
galt
Sat Feb 1 12:40:53 2020 -0800
cirm cdwWebBrowse. Cannot just pass initialwhere, so get it from the cart.
diff --git src/hg/lib/tablesTables.c src/hg/lib/tablesTables.c
index 89cb7cd..dab9121 100644
--- src/hg/lib/tablesTables.c
+++ src/hg/lib/tablesTables.c
@@ -72,31 +72,30 @@
/* Print instructional text, and basic summary info on who passes filter, and a submit
* button just in case user needs it */
{
/* Print info on matching */
int matchCount = slCount(table->rowList);
if (largerContext != NULL) // Need to page?
matchCount = largerContext->tableSize;
printf("");
printf("  ");
printf("");
jsOnEventById("click", "clearButton",
"$(':input').not(':button, :submit, :reset, :hidden, :checkbox, :radio').val('');\n"
"$('[name=cdwBrowseFiles_page]').val('1');\n"
- "$('[name=clearSearch]').val('1');\n"
"$('#submit').click();\n");
printf("
");
printf("%d %s found. ", matchCount, itemPlural);
if (addFunc)
addFunc(matchCount);
if (!visibleFacetList)
{
printf("
\n");
printf("You can further filter search results field by field below. ");
printf("Wildcard * and ? characters are allowed in text fields. ");
printf(">min or <max are allowed in numerical fields.
\n");
@@ -382,80 +381,80 @@
"$('[name=%s_page]').val('%d');\n"
"$('#submit').click();\n"
, varPrefix, totalPages);
}
}
}
}
void webFilteredFieldedTable(struct cart *cart, struct fieldedTable *table,
char *returnUrl, char *varPrefix,
int maxLenField, struct hash *tagOutputWrappers, void *wrapperContext,
boolean withFilters, char *itemPlural,
int pageSize, struct fieldedTableSegment *largerContext, struct hash *suggestHash,
struct facetField **ffArray, char *visibleFacetList,
- void (*addFunc)(int), char *initialWhere)
+ void (*addFunc)(int))
/* Show a fielded table that can be sorted by clicking on column labels and optionally
* that includes a row of filter controls above the labels .
* The maxLenField is maximum character length of field before truncation with ...
* Pass in 0 for no max */
{
if (strchr(returnUrl, '?') == NULL)
errAbort("Expecting returnUrl to include ? in showFieldedTable\nIt's %s", returnUrl);
if (withFilters || visibleFacetList)
showTableFilterInstructionsEtc(table, itemPlural, largerContext, addFunc, visibleFacetList);
// Show top bar with quick-deselects for selected facet values
// as well a clear restriction button that cleans out cdwFile_filter cart var.
if (visibleFacetList)
{
+ char *where = cartUsualString(cart, "cdwFile_filter", "");
- if (!isEmpty(initialWhere))
+ if (!isEmpty(where))
{
// left column
printf("