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;sIx<sortOrder->count;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 <BR> in titles for wrapping
 printf("<TABLE class='sortable' style='border: 2px outset #006600;'>\n");
 printf("<THEAD class='sortable'>\n");
 printf("<TR class='sortable' valign='bottom'>\n");
 printf("<TD align='center' valign='center'>&nbsp;");
 int filesCount = slCount(fileList);
 if (filesCount > 5)
     printf("<em><span class='filesCount'></span>%d files</em>",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("<INPUT TYPE=HIDDEN NAME='%s' class='sortOrder' VALUE=\"%s\">",sortOrder->htmlId, sortOrder->sortOrder);
 printf("</TD>\n");
 columnCount++;
 
-/*#define SHOW_FOLDER_FOR_COMPOSITE_DOWNLOADS
-#ifdef SHOW_FOLDER_FOR_COMPOSITE_DOWNLOADS
-if (parentTdb == NULL)
-    {
-    printf("<TD align='center' valign='center'>&nbsp;</TD>");
-    columnCount++;
-    }
-#endif///def SHOW_FOLDER_FOR_COMPOSITE_DOWNLOADS
-*/
 // Now the columns
 int curOrder = 0,ix=0;
 if (sortOrder)
     {
     curOrder = sortOrder->count;
     for(ix=0;ix<sortOrder->count;ix++)
         {
         char *align = (sameString("labVersion",sortOrder->column[ix]) || sameString("softwareVersion",sortOrder->column[ix]) ? " align='left'":"");
         printf("<TH class='sortable sort%d%s' %s%s%s>%s</TH>\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;