70ef68d210fa4b76c16f7b8e8142a8180f75052a tdreszer Fri Jun 17 20:14:06 2011 -0700 Big checkin of jquery 1.5.1, jquery-ui 1.8 and ui-dropdownchecklist 1.3. Needs more testing and CSS work. DDCL is working on FF, Chrome and IE. Both Chrome and IE support required tiny changes to the DDCL wigit code. DDCL may still have problems with IE. Other jquery wigits have been tested at a cursory level and work fine. Ajax calls may need an extrat dataType: html param. Dialog (popup) needs CSS tuning. diff --git src/hg/lib/hui.c src/hg/lib/hui.c index 6d0ab7f..70607c4 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -3493,31 +3493,35 @@ for(filterBy = filterBySet;filterBy != NULL; filterBy = filterBy->next) { puts("<TD>"); if(count == 1) printf("<B>Filter by %s</B> (select multiple items - %s)",filterBy->title,FILTERBY_HELP_LINK); else printf("<B>%s</B>",filterBy->title); //if (onOneLine && count > 1) // NOTE: onOneLine doesn't work because filterBy with multiple selected will align above title! printf("<BR>\n"); //else // printf(":\n"); // TODO: Scroll long lists //#define FILTER_COMPOSITE_OPEN_SIZE 16 // TODO: columnCount (Number of filterBoxes per row) should be configurable through tdb setting + #ifdef NEW_JQUERY + #define FILTER_BY_FORMAT "<SELECT id='fbc%d' name='%s.filterBy.%s' multiple style='display: none; font-size:.9em;' class='filterComp filterBy'><BR>\n" + #else///ifndef NEW_JQUERY #define FILTER_BY_FORMAT "<SELECT id='fbc%d' name='%s.filterBy.%s' multiple style='display: none;' class='filterComp filterBy'><BR>\n" + #endif///ndef NEW_JQUERY printf(FILTER_BY_FORMAT,ix,tdb->track,filterBy->column); ix++; printf("<OPTION%s%s>All</OPTION>\n",(filterBy->slChoices == NULL || slNameInList(filterBy->slChoices,"All")?" SELECTED":""),(filterBy->colorFollows?" style='color: #000000;'":"") ); struct slName *slValue; if(filterBy->useIndex) { int ix=1; for(slValue=filterBy->slValues;slValue!=NULL;slValue=slValue->next,ix++) { char varName[32]; safef(varName, sizeof(varName), "%d",ix); char *name = strSwapChar(cloneString(slValue->name),'_',' '); printf("<OPTION"); if (filterBy->slChoices != NULL && slNameInList(filterBy->slChoices,varName)) printf(" SELECTED"); @@ -6431,31 +6435,35 @@ // 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 fullSize++; // Room for "All" #endif///def FILTER_COMPOSITE_OPEN_SIZE +#ifdef NEW_JQUERY + #define FILTER_COMPOSITE_FORMAT "<SELECT id='fc%d' name='%s.filterComp.%s' %s onchange='filterCompositeSelectionChanged(this);' style='display: none; font-size:.8em;' class='filterComp'><BR>\n" +#else///ifndef NEW_JQUERY #define FILTER_COMPOSITE_FORMAT "<SELECT id='fc%d' name='%s.filterComp.%s' %s onchange='filterCompositeSelectionChanged(this);' style='display: none;' class='filterComp'><BR>\n" +#endif///ndef NEW_JQUERY printf(FILTER_COMPOSITE_FORMAT,dimIx,parentTdb->track,membersForAll->members[dimIx]->groupTag,"multiple"); #ifdef FILTER_COMPOSITE_ONLYONE // DO we support anything besides multi? (membersForAll->members[dimIx]->fcType == fctMulti?"multiple ":"")); if(membersForAll->members[dimIx]->fcType != fctOneOnly) #endif///def FILTER_COMPOSITE_ONLYONE printf("<OPTION%s>All</OPTION>\n",(sameWord("All",membersForAll->checkedTags[dimIx])?" SELECTED":"") ); int ix=0; for(ix=0;ix<membersForAll->members[dimIx]->count; ix++) { boolean alreadySet = membersForAll->members[dimIx]->selected[ix]; printf("<OPTION%s value=%s>%s</OPTION>\n",(alreadySet?" SELECTED":""), membersForAll->members[dimIx]->tags[ix],membersForAll->members[dimIx]->titles[ix]); }