4880079233bb3e037c495199d495bfdb79c99eed
Merge parents 8931b6a 9900ab6
tdreszer
  Mon Nov 21 15:49:43 2011 -0800
Merg-o-rama
diff --cc src/hg/lib/hui.c
index 958e2e8,1dca1c2..5845d9e
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@@ -6718,57 -6474,52 +6718,57 @@@
              first = FALSE;
              }
          }
      }
  dyStringPrintf(dyLink,VOCAB_MULTILINK_END,members->groupTitle,members->groupTitle);
  freeMem(vocab);
  return dyStringCannibalize(&dyLink);
  }
  
  static boolean compositeUiByFilter(char *db, struct cart *cart, struct trackDb *parentTdb, char *formName)
  /* UI for composite tracks: filter subgroups by multiselects to select subtracks. */
  {
  membersForAll_t* membersForAll = membersForAllSubGroupsGet(parentTdb,cart);
  if(membersForAll == NULL || membersForAll->filters == FALSE) // Not Matrix or filters
      return FALSE;
 -webIncludeResourceFile("ui.dropdownchecklist.css");
 -jsIncludeFile("ui.dropdownchecklist.js",NULL);
 -#ifdef NEW_JQUERY
 -jsIncludeFile("ddcl.js",NULL);
 -#endif///def NEW_JQUERY
 +if(cartOptionalString(cart, "ajax") == NULL)
 +    {
 +    webIncludeResourceFile("ui.dropdownchecklist.css");
 +    jsIncludeFile("ui.dropdownchecklist.js",NULL);
 +    jsIncludeFile("ddcl.js",NULL);
 +    }
  
  cgiDown(0.7);
- printf("<B>Filter subtracks %sby:</B> (select multiple %sitems - %s)<BR>\n",
+ printf("<B>Select subtracks %sby:</B> (select multiple %sitems - %s)<BR>\n",
         (membersForAll->members[dimX] != NULL || membersForAll->members[dimY] != NULL ? "further ":""),
         (membersForAll->dimMax == dimA?"":"categories and "),FILTERBY_HELP_LINK);
  printf("<TABLE><TR valign='top'>\n");
  
  // Do All [+][-] buttons
  if(membersForAll->members[dimX] == NULL && membersForAll->members[dimY] == NULL) // No matrix
      {
 -    #define PM_BUTTON_FILTER_COMP "<input type='button' class='inOutButton' onclick=\"waitOnFunction(filterCompositeSet,this,%s); return false;\" id='btn_%s' value='%c'>"
      printf("<TD align='left' width='50px'><B>All:</B><BR>");
 +#ifdef BUTTONS_BY_CSS
 +    // TODO: Test when a real world case actually calls this.  Currently no trackDb.ra cases exist
 +    #define BUTTON_FILTER_COMP "<span class='pmButton inOutButton' onclick='waitOnFunction(filterCompositeSet,this,%s)'>%c</span>"
 +    printf(BUTTON_FILTER_COMP,"true", '+');
 +    printf(BUTTON_FILTER_COMP,"false",'-');
 +#else///ifndef BUTTONS_BY_CSS
 +    #define PM_BUTTON_FILTER_COMP "<input type='button' class='inOutButton' onclick=\"waitOnFunction(filterCompositeSet,this,%s); return false;\" id='btn_%s' value='%c'>"
      printf(PM_BUTTON_FILTER_COMP,"true",  "plus_fc",'+');
      printf(PM_BUTTON_FILTER_COMP,"false","minus_fc",'-');
 -    //#define PM_BUTTON2_FILTER_COMP "<IMG height=18 width=18 onclick=\"filterCompositeSet(%s);\" id='btn_%s' src='../images/%s'>"
 -    //printf(PM_BUTTON2_FILTER_COMP,"true",  "plus_fc",   "add_sm.gif");
 -    //printf(PM_BUTTON2_FILTER_COMP,"false","minus_fc","remove_sm.gif");
 +#endif///ndef BUTTONS_BY_CSS
      printf("</TD>\n");
      }
  
  // Now make a filterComp box for each ABC dimension
  int dimIx=dimA;
  for(dimIx=dimA;dimIx<membersForAll->dimMax;dimIx++)
      {
    //printf("<TD align='right'><B>%s:</B></TD><TD align='left'>\n",labelWithVocabLinkForMultiples(db,parentTdb,membersForAll->members[dimIx]));
      printf("<TD align='left'><B>%s:</B><BR>\n",labelWithVocabLinkForMultiples(db,parentTdb,membersForAll->members[dimIx]));
  
      #ifdef FILTER_COMPOSITE_OPEN_SIZE
      int fullSize = membersForAll->members[dimIx]->count;
      #ifdef FILTER_COMPOSITE_ONLYONE
      if(membersForAll->members[dimIx]->fcType != fctOneOnly)
      #endif///def FILTER_COMPOSITE_ONLYONE