26f820467afa323064eb88e948348545e9dc010b
max
Fri Jul 29 14:31:08 2016 -0700
Adding a "Download All" button to the CIRM CDW. No redmine.
diff --git src/hg/lib/tablesTables.c src/hg/lib/tablesTables.c
index 2ec4a51..cdcfc0b 100644
--- src/hg/lib/tablesTables.c
+++ src/hg/lib/tablesTables.c
@@ -19,42 +19,44 @@
/* Return fieldedTable from a database query */
{
struct sqlResult *sr = sqlGetResult(conn, query);
char **fields;
int fieldCount = sqlResultFieldArray(sr, &fields);
struct fieldedTable *table = fieldedTableNew(query, fields, fieldCount);
char **row;
int i = 0;
while ((row = sqlNextRow(sr)) != NULL)
fieldedTableAdd(table, row, fieldCount, ++i);
sqlFreeResult(&sr);
return table;
}
static void showTableFilterInstructionsEtc(struct fieldedTable *table,
- char *itemPlural, struct fieldedTableSegment *largerContext)
+ char *itemPlural, struct fieldedTableSegment *largerContext, void (*addFunc)(void))
/* 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;
cgiMakeButton("submit", "search");
printf("   ");
printf("%d %s found. ", matchCount, itemPlural);
+if (addFunc)
+ addFunc();
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");
}
static void printSuggestScript(char *id, struct slName *suggestList)
/* Print out a little javascript to wrap auto-suggester around control with given ID */
{
printf("