0df62533ce94e914b0eb5d4490744d219eb721e5
tdreszer
Tue Dec 20 14:28:42 2011 -0800
Objectified sortTable and filterTable but no functional change is here.
diff --git src/hg/lib/fileUi.c src/hg/lib/fileUi.c
index d3d7ee4..af494b4 100644
--- src/hg/lib/fileUi.c
+++ src/hg/lib/fileUi.c
@@ -538,31 +538,31 @@
slPairAdd(&tagLabelPairs,tag,cloneString((char *)cvLabel(var,term->name)));
slNameFree(&term);
}
// If there is more than one val for this var then create filterBy box for it
if (slCount(tagLabelPairs) > 1)
{
// should have a list sorted on the label
enum cvDataType eCvDataType = cvDataType(var);
if (eCvDataType == cvInteger)
slPairValAtoiSort(&tagLabelPairs);
else
slPairValSortCase(&tagLabelPairs);
char extraClasses[256];
safef(extraClasses,sizeof extraClasses,"filterTable %s",var);
- char *dropDownHtml = cgiMakeMultiSelectDropList(var,tagLabelPairs,NULL,"All",extraClasses,"onchange='filterTable(this);' style='font-size:.9em;'");
+ char *dropDownHtml = cgiMakeMultiSelectDropList(var,tagLabelPairs,NULL,"All",extraClasses,"onchange='filterTable.filter(this);' style='font-size:.9em;'");
// Note filterBox has classes: filterBy & {var}
if (dropDownHtml)
{
dyStringPrintf(dyFilters,"
\n%s: \n%s | | \n",
labelWithVocabLink(var,sortOrder->title[sIx],tagLabelPairs,TRUE),dropDownHtml); // TRUE were sending tags, not values
freeMem(dropDownHtml);
count++;
if (sIx < 32) // avoid bit overflow but 32 filterBoxes? I don't think so
filterableBits |= (0x1<<(sIx));
}
}
if (tagLabelPairs != NULL)
slPairFreeValsAndList(&tagLabelPairs);
}
@@ -813,31 +813,31 @@
printf(" ",(restrictedColumn > 1 ? (restrictedColumn - 1) : columnCount));
// Total
if (filesCount > 5)
printf("%d files",filesCount);
// Restriction policy link in later column?
if (restrictedColumn > 1)
printf(" | Restriction Policy", columnCount,ENCODE_DATA_RELEASE_POLICY);
printf("\n");
printf("\n");
if (parentTdb == NULL)
- printf("\n");
+ printf("\n");
if (timeIt)
uglyTime("Finished table");
return filesCount;
}
static int filesFindInDir(char *db, struct mdbObj **pmdbFiles, struct fileDb **pFileList, char *fileType, int limit,boolean *exceededLimit)
// Prints list of files in downloads directories matching mdb search terms. Returns count
{
int fileCount = 0;
// Verify file existance and make fileList of those found
struct fileDb *fileList = NULL, *oneFile = NULL; // Will contain found files
struct mdbObj *mdbFiles = NULL; // Will caontain a list of mdbs for the found files
struct mdbObj *mdbList = *pmdbFiles;
|