6c1f41fb7917a57861810431337b400d21714c25 galt Thu Jan 30 18:17:24 2020 -0800 Initial check-in for a new top-bar showing the selected facets and their values for easily seeing what has been selected, and de-selecting is easy by clicking there if you want to. Also added an explicit button for clearing the Restrictions, i.e. cdwFile_filter cart var filter. diff --git src/hg/inc/facetField.h src/hg/inc/facetField.h index 0ebf422..eed8db3 100644 --- src/hg/inc/facetField.h +++ src/hg/inc/facetField.h @@ -22,30 +22,33 @@ int useCount; /* Number of times field is used */ struct hash *valHash; /* Hash of tag values, facetVal valued */ struct facetVal *valList; /* List of tag values sorted with most used first */ struct facetVal *currentVal; /* Temporary value saves having to repeat hash lookup. */ boolean allSelected; /* When on no specific values selected, so all values are selected. default TRUE. */ boolean showAllValues; /* When true, show all values, otherwise only show first 100 values plus See More link, defaults to false */ }; int facetValCmpSelectCountDesc(const void *va, const void *vb); /* Compare two facetVal so as to sort them based on selectCount with most used first. * If two have same count, sort alphabetically on facet val. */ int facetValCmp(const void *va, const void *vb); /* Compare two facetVal alphabetically by val */ +struct facetVal *facetsClone(struct facetVal *origList); +/* Copy the facet vals list */ + void selectedListFacetValUpdate(struct facetField **pSelectedList, char *facetName, char *facetValue, char *op); /* Add or remove by changing selected boolean */ char *linearizeFacetVals(struct facetField *selectedList); /* Linearize selected fields vals into a string */ struct facetField *deLinearizeFacetValString(char *selectedFields); /* Turn linearized selected fields string back into facet structures */ boolean perRowFacetFields(int fieldCount, char **row, char *nullVal, struct facetField *ffArray[]); /* Process each row of a resultset updating use and select counts. * Returns TRUE if row passes selected facet values filter and should be included in the final result set. */ struct facetField *facetFieldsFromSqlTableInit(char *fields[], int fieldCount, char *selectedFields, struct facetField *ffArray[]); /* Initialize ffList and ffArray and selected facet values */