fc01c55b6d56b2eef920b18bf959d31f64c3c294 tdreszer Thu Dec 22 11:37:13 2011 -0800 Removing old ifdefs. No functional changes here. diff --git src/hg/lib/fileUi.c src/hg/lib/fileUi.c index af494b4..d47933d 100644 --- src/hg/lib/fileUi.c +++ src/hg/lib/fileUi.c @@ -474,37 +474,32 @@ return dyStringCannibalize(&dyLink); } static int filterBoxesForFilesList(char *db,struct mdbObj *mdbObjs,sortOrder_t *sortOrder) { // Will create filterBoxes for each sortOrder field. Returns bitmask of sortOrder colums included int count = 0; int filterableBits = 0; if (sortOrder != NULL) { struct dyString *dyFilters = dyStringNew(256); int sIx=0; for(sIx = 0;sIxcount;sIx++) { char *var = sortOrder->column[sIx]; enum cvSearchable searchBy = cvSearchMethod(var); - //#define FILTERBY_ALL_SEARCHABLE - #ifdef FILTERBY_ALL_SEARCHABLE - if (searchBy == cvNotSearchable) - #else///ifndef FILTERBY_ALL_SEARCHABLE if (searchBy == cvNotSearchable || searchBy == cvSearchByFreeText) - #endif///ndef FILTERBY_ALL_SEARCHABLE - continue; // Only single selects and multi-select make good candidates for filtering + continue; // Free text is not good candidate for filters. Best is single word/date/int. // get all vals for var, then convert to tag/label pairs for filterBys struct slName *vals = mdbObjsFindAllVals(mdbObjs, var, CV_LABEL_EMPTY_IS_NONE); if (searchBy != cvSearchByMultiSelect && searchBy != cvSearchBySingleSelect) { // We can't be too ambitious about creating filterboxes on the fly so some limitations: // If there are more than 80 options, the filterBy is way too large and of limited use // If there is a distinct val for each file in the table, then the filterBy is the same size // as the table and of no help. Really the number of options should be half the number of rows // but we are being lenient and cutting off at 0.8 not 0.5 // If there is any non-alphanum char in a value then the filterBy will fail in js code. // Those filterBy's are abandoned a but further down. int valCount = slCount(vals); if (valCount > 80 || valCount > (slCount(mdbObjs) * 0.8)) { @@ -633,39 +628,30 @@ int restrictedColumn = 0; char *nowrap = (sortOrder->setting != NULL ? " nowrap":""); // Sort order trackDb setting found so rely on
in titles for wrapping printf("\n"); printf("\n"); printf("\n"); printf("\n"); columnCount++; -/*#define SHOW_FOLDER_FOR_COMPOSITE_DOWNLOADS -#ifdef SHOW_FOLDER_FOR_COMPOSITE_DOWNLOADS -if (parentTdb == NULL) - { - printf(""); - columnCount++; - } -#endif///def SHOW_FOLDER_FOR_COMPOSITE_DOWNLOADS -*/ // Now the columns int curOrder = 0,ix=0; if (sortOrder) { curOrder = sortOrder->count; for(ix=0;ixcount;ix++) { char *align = (sameString("labVersion",sortOrder->column[ix]) || sameString("softwareVersion",sortOrder->column[ix]) ? " align='left'":""); printf("\n", sortOrder->order[ix],(sortOrder->forward[ix]?"":" sortRev"), (sameString("fileSize",sortOrder->column[ix])?"abbr='use' ":""), nowrap,align,sortOrder->title[ix]); // keeing track of sortOrder columnCount++; if (sameWord(sortOrder->column[ix],"dateUnrestricted")) restrictedColumn = columnCount;
 "); int filesCount = slCount(fileList); if (filesCount > 5) printf("%d files",filesCount); //if (sortOrder) // NOTE: This could be done to preserve sort order FIXME: However hgFileUi would need form OR changes would need to be ajaxed over AND hgsid would be needed. // printf("",sortOrder->htmlId, sortOrder->sortOrder); printf(" %s