3cd12608e8522ce11807b6dcad6396b97ef55687 tdreszer Wed Jan 22 16:27:56 2014 -0800 Cleaned up the hgTracks configure group tables at Donna's request. All groups are combined into a single table divided by empty data rows. Redmine #12546 diff --git src/hg/hgTracks/config.c src/hg/hgTracks/config.c index 6127a30..2937214 100644 --- src/hg/hgTracks/config.c +++ src/hg/hgTracks/config.c @@ -78,49 +78,50 @@ if (changeVis != -2) { if (groupTarget == NULL || (groupList != NULL && sameString(groupTarget, groupList->name))) { if (changeVis == -1) rulerMode = tvFull; else rulerMode = changeVis; } } #endif /* BOB_DOESNT_LIKE */ jsInit(); cgiMakeHiddenVar(configGroupTarget, "none"); + +// Now all groups are in a single table, divided by an empty borderless row +hPrintf("\n"); for (group = groupList; group != NULL; group = group->next) { struct trackRef *tr; if (group->trackList == NULL) continue; /* check if group section should be displayed */ char *otherState; char *indicator; char *indicatorImg; boolean isOpen = !isCollapsedGroup(group); collapseGroupGoodies(isOpen, FALSE, &indicatorImg, &indicator, &otherState); - hPrintf("
\n", - HG_COL_INSIDE); hPrintf(""); hPrintf("\n"); } +hPrintf("
"); - hPrintf("\n"); + hPrintf("\n"); /* First non-CT, non-hub group gets ruler. */ if (!showedRuler && !isHubTrack(group->name) && differentString(group->name, "user")) { showedRuler = TRUE; hPrintf("",(isOpen ? "" : "style='display: none'"), group->name); hPrintf(""); - hPrintf(""); - hPrintf(""); - hPrintf("\n"); + hPrintf("\n"); } /* Scan track list to determine which supertracks have visible member * tracks, and to insert a track in the list for the supertrack. * Sort tracks and supertracks together by priority */ makeGlobalTrackHash(trackList); groupTrackListAddSuper(cart, group); if (!withPriorityOverride) { /* sort hierarchically by priority, considering supertracks */ struct trackRef *refList = NULL, *ref; for (tr = group->trackList; tr != NULL; tr = tr->next) { struct track *track = tr->track; if (tdbIsSuperTrackChild(track->tdb)) @@ -213,87 +210,87 @@ slAddTail(&refList, ref); } } } } group->trackList = refList; } /* Loop through this group and display */ int rowCount=1; for (tr = group->trackList; tr != NULL; tr = tr->next) { struct track *track = tr->track; struct trackDb *tdb = track->tdb; - hPrintf("",(isOpen ? "" : "style='display: none'"),group->name, rowCount++); + hPrintf("",(isOpen ? "" : "style='display: none;'"), + group->name, rowCount++); hPrintf(""); - hPrintf(""); - hPrintf(""); - hPrintf("\n"); + hPrintf("\n"); } - hPrintf("
"); + hPrintf("
"); hPrintf("\n",group->name); hPrintf("", collapseGroupVar(group->name),collapseGroupVar(group->name), (isOpen?0:1)); //#define BUTTONS_BY_CSS_NOT_HERE #ifdef BUTTONS_BY_CSS_NOT_HERE hPrintf("%s  ", group->name, group->name, isOpen?"Collapse":"Expand", indicator); #else///ifndef BUTTONS_BY_CSS_NOT_HERE hPrintf("%s  ", group->name, group->name, indicatorImg, indicator,isOpen?"Collapse":"Expand"); #endif///ndef BUTTONS_BY_CSS_NOT_HERE hPrintf(" %s ", group->label); hPrintf("   "); @@ -138,52 +139,48 @@ jsSetVerticalPosition("mainForm")); hPrintf(" "); hPrintf("", configDefaultAll, "default", configGroupTarget, group->name, jsSetVerticalPosition("mainForm")); hPrintf(" "); /* do not want all the submit buttons named the same. It is * confusing to the javascript submit() function. */ char submitName[256]; safef(submitName, sizeof(submitName), "%sSubmit", group->name); cgiMakeButtonWithMsg(submitName, "submit","Submit your selections and view them in the browser"); hPrintf("
\n"); - hPrintf("\n"); - hPrintf("
"); hPrintf("", hgTrackUiName(), cartSessionVarName(), cartSessionId(cart), chromName, RULER_TRACK_NAME); hPrintf("%s", RULER_TRACK_LABEL); - hPrintf(""); + hPrintf(""); hTvDropDownClass("ruler", rulerMode, FALSE, rulerMode ? "normalText" : "hiddenText"); - hPrintf(""); + hPrintf(""); hPrintf("Chromosome position in bases. (Clicks here zoom in 3x)"); - hPrintf("
"); if (tdbIsSuperTrackChild(tdb)) /* indent members of a supertrack */ hPrintf("    "); // Print an icon before the title when one is defined hPrintPennantIcon(tdb); if (track->hasUi) hPrintf("", tdb->parent ? "Part of super track: " : "Configure ", tdb->parent ? tdb->parent->shortLabel : tdb->shortLabel, hgTrackUiName(),cartSessionVarName(), cartSessionId(cart), track->track); hPrintf(" %s", tdb->shortLabel); if (tdbIsSuper(tdb)) hPrintf("..."); if (track->hasUi) hPrintf(""); - hPrintf(""); + hPrintf(""); if (tdbIsSuperTrackChild(tdb)) /* indent members of a supertrack */ hPrintf("    "); /* If track is not on this chrom print an informational message for the user. */ if (tdbIsDownloadsOnly(tdb)) // No vis display for downloadsOnly hPrintf("Downloads", hgFileUiName(),cartSessionVarName(), cartSessionId(cart), tdb->track); else if (hTrackOnChrom(track->tdb, chromName)) { if (tdbIsSuper(track->tdb)) { /* supertrack dropdown is hide/show */ superTrackDropDown(cart, track->tdb, 1); } else { /* check for option of limiting visibility to one mode */ hTvDropDownClassVisOnly(track->track, track->visibility, rTdbTreeCanPack(track->tdb), (track->visibility == tvHide) ? "hiddenText" : "normalText", trackDbSetting(track->tdb, "onlyVisibility")); } } else hPrintf("[No data-%s]", chromName); - hPrintf(""); + hPrintf(""); hPrintf("%s", tdb->longLabel); - hPrintf("
\n"); + hPrintf("
"); cgiDown(0.9); + hPrintf("
\n"); } static int addDownloadOnlyTracks(char *db,struct group **pGroupList,struct track **pTrackList) // Download only tracks are not normaly incorporated into the grou and track lists { int count = 0; struct track *track = NULL; struct group *group = NULL; struct trackDb *tdbList = hTrackDb(db); struct trackDb *tdb = tdbList; for (;tdb != NULL; tdb = tdb->next) { if (!tdbIsDownloadsOnly(tdb) || tdbIsFolderContent(tdb) || tdbIsCompositeChild(tdb))