69e8424f77f7d2513fcf8082aea972d539665540 tdreszer Fri Nov 18 13:14:56 2011 -0800 More touches on BUTTONS_BY_CSS diff --git src/hg/lib/jsHelper.c src/hg/lib/jsHelper.c index 089b710..526f8da 100644 --- src/hg/lib/jsHelper.c +++ src/hg/lib/jsHelper.c @@ -436,37 +436,43 @@ void jsBeginCollapsibleSection(struct cart *cart, char *track, char *section, char *sectionTitle, boolean isOpenDefault) /* Make the hidden input, collapse/expand button and needed for utils.js's * setTableRowVisibility(). Caller needs to have already created a and . */ { char collapseGroupVar[512]; safef(collapseGroupVar, sizeof(collapseGroupVar), "%s.section_%s_close", track, section); boolean isOpen = !cartUsualBoolean(cart, collapseGroupVar, !isOpenDefault); // Both plus button and title are now in same \n", sectionTitle); printf(". */ { puts(""); } struct jsonStringElement *newJsonString(char *str) { struct jsonStringElement *ele; AllocVar(ele); ele->str = cloneString(str);
// but still colspan=2 because we are lib code and callers own the table. printf("
\n"); printf("\n", collapseGroupVar, collapseGroupVar, isOpen ? "0" : "1"); +#ifdef BUTTONS_BY_CSS + hPrintf("%c", + section, track, section, (isOpen ? "Collapse": "Expand"), (isOpen ? '-' : '+')); +#else///ifndef BUTTONS_BY_CSS char *buttonImage = (isOpen ? "../images/remove_sm.gif" : "../images/add_sm.gif"); printf("%s\n", section, track, section, buttonImage, (isOpen ? "-" : "+"), (isOpen ? "Collapse": "Expand")); +#endif///ndef BUTTONS_BY_CSS printf(" %s
", isOpen ? "" : "style='display: none' ", section, 1); } void jsEndCollapsibleSection() /* End the collapsible