5dcb29342990fc6a3f955ede507bc6114ed245d2 tdreszer Thu Jun 23 14:59:05 2011 -0700 Removed commented out code that was checked in by accident. diff --git src/hg/lib/hui.c src/hg/lib/hui.c index 580209b..86b8c44 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -3507,31 +3507,30 @@ int ix=0; 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); printf("<BR>\n"); // TODO: columnCount (Number of filterBoxes per row) should be configurable through tdb setting //#define FILTER_BY_FORMAT "<SELECT id='fbc%d' name='%s.filterBy.%s' multiple><BR>\n" #define FILTER_BY_FORMAT "<SELECT id='fbc%d' name='%s.filterBy.%s' multiple style='display: none;' class='filterComp filterBy'><BR>\n" 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->styleFollows?" style='color: #000000;'":"") ); printf("<OPTION%s>All</OPTION>\n",(filterBy->slChoices == NULL || slNameInList(filterBy->slChoices,"All")?" SELECTED":"")); struct slName *slValue; int ix=1; for(slValue=filterBy->slValues;slValue!=NULL;slValue=slValue->next,ix++) { char varName[32]; char *label = NULL; char *name = NULL; if (filterBy->useIndex) { safef(varName, sizeof(varName), "%d",ix); name = varName; label = slValue->name; } @@ -3545,87 +3544,31 @@ printf(" SELECTED"); if (filterBy->useIndex || filterBy->valueAndLabel) printf(" value='%s'",name); if (filterBy->styleFollows) { char *styler = label + strlen(label)+1; if (*styler != '\0') { if (*styler == '#') // Legacy: just the color that follows printf(" style='color: %s;'",styler); else printf(" style='%s'",styler); } } printf(">%s</OPTION>\n",label); - //freeMem(name); } - - /* - 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"); - printf(" value='%s'",varName); - if (filterBy->styleFollows) - { - char *styler = slValue->name + strlen(slValue->name)+1; - if (*styler != '\0') - { - if (*styler == '#') // Legacy: just the color that follows - printf(" style='color: %s;'",styler); - else - printf(" style='%s'",styler); - } - } - printf(">%s</OPTION>\n",name); - freeMem(name); - } - } - else - { - for(slValue=filterBy->slValues;slValue!=NULL;slValue=slValue->next) - { - char *label = (filterBy->valueAndLabel? slValue->name + strlen(slValue->name)+1: slValue->name); - printf("<OPTION"); - if (filterBy->slChoices != NULL && slNameInList(filterBy->slChoices,slValue->name)) - printf(" SELECTED"); - if (filterBy->valueAndLabel) - printf(" value='%s'",slValue->name); - // Style could follow a label - if (filterBy->styleFollows) - { - char *styler = label + strlen(label)+1; - if (*styler != '\0') - { - if (*styler == '#') // Legacy: just the color that follows - printf(" style='color: %s;'",styler); - else - printf(" style='%s'",styler); - } - } - printf(">%s</OPTION>\n",label); - } - } - */ } printf("</SELECT>\n"); // The following is needed to make msie scroll to selected option. printf("<script type='text/javascript'>onload=function(){ if( $.browser.msie ) { $(\"select[name^='%s.filterBy.']\").children('option[selected]').each( function(i) { $(this).attr('selected',true); }); }}</script>\n",tdb->track); puts("</TR></TABLE>"); return; } #define COLOR_BG_DEFAULT_IX 0 #define COLOR_BG_ALTDEFAULT_IX 1 #define DIVIDING_LINE "<TR valign=\"CENTER\" line-height=\"1\" BGCOLOR=\"%s\"><TH colspan=\"5\" align=\"CENTER\"><hr noshade color=\"%s\" width=\"100%%\"></TD></TR>\n" #define DIVIDER_PRINT(color) printf(DIVIDING_LINE,COLOR_BG_DEFAULT,(color))