701a85b9260e1a356e216789b300aa5b02a97f60
tdreszer
  Wed Nov 23 10:40:33 2011 -0800
Imported BUTTON_BY_CSS from branch because it goes with MATRIX_SQUEEZE
diff --git src/hg/lib/jsHelper.c src/hg/lib/jsHelper.c
index dbca263..3c86f68 100644
--- src/hg/lib/jsHelper.c
+++ src/hg/lib/jsHelper.c
@@ -434,37 +434,43 @@
 
 void jsBeginCollapsibleSection(struct cart *cart, char *track, char *section, char *sectionTitle,
 			       boolean isOpenDefault)
 /* Make the hidden input, collapse/expand button and <TR id=...> needed for utils.js's
  * setTableRowVisibility().  Caller needs to have already created a <TABLE> and <FORM>. */
 {
 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 <TD>
 // but still colspan=2 because we are lib code and callers own the table.
 printf("<TR><TD colspan=2 style='text-align:left;'>\n");
 printf("<input type='hidden' name='%s' id='%s' value='%s'>\n",
        collapseGroupVar, collapseGroupVar, isOpen ? "0" : "1");
+#ifdef BUTTONS_BY_CSS
+    hPrintf("<span class='pmButton bigBlue' onclick=\"setTableRowVisibility(this, '%s', '%s.section', 'section', true)\" "
+            "id='%s_button' title='%s this section'>%c</span>",
+       section, track, section, (isOpen ? "Collapse": "Expand"), (isOpen ? '-' : '+'));
+#else///ifndef BUTTONS_BY_CSS
 char *buttonImage = (isOpen ? "../images/remove_sm.gif" : "../images/add_sm.gif");
 printf("<IMG height='18' width='18' "
        "onclick=\"return setTableRowVisibility(this, '%s', '%s.section', 'section', true);\" "
        "id='%s_button' src='%s' alt='%s' title='%s this section' class='bigBlue'"
        " style='cursor:pointer;'>\n",
        section, track,
        section, buttonImage, (isOpen ? "-" : "+"), (isOpen ? "Collapse": "Expand"));
+#endif///ndef BUTTONS_BY_CSS
 printf("<B style='font-size:larger;'>&nbsp;%s</B></TD></TR>\n", sectionTitle);
 printf("<TR %sid='%s-%d'><TD colspan=2>", isOpen ? "" : "style='display: none' ", section, 1);
 }
 
 void jsEndCollapsibleSection()
 /* End the collapsible <TR id=...>. */
 {
 puts("</TD></TR>");
 }
 
 struct jsonStringElement *newJsonString(char *str)
 {
 struct jsonStringElement *ele;
 AllocVar(ele);
 ele->str = cloneString(str);