5b97c90762187cf1993742fe8c422308e08d082c tdreszer Wed Jul 11 17:08:55 2012 -0700 Next batch of many checkins as dictated by Jim. Formatting if and limiting lines to 100 chars. Changes limited to lines last touched by tdreszer (git blame) so as not to ruin history. None of these changes should affect executables in any way. diff --git src/hg/hgTracks/config.c src/hg/hgTracks/config.c index f0612f3..ea8a65d 100644 --- src/hg/hgTracks/config.c +++ src/hg/hgTracks/config.c @@ -91,60 +91,66 @@ cgiMakeHiddenVar(configGroupTarget, "none"); 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("
\n", + HG_COL_INSIDE); hPrintf(""); hPrintf("\n"); hPrintf("\n"); /* First non-CT, non-hub group gets ruler. */ if (!showedRuler && !isHubTrack(group->name) && @@ -233,47 +239,46 @@ 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(""); hPrintf(""); 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  ", + hPrintf("%s  ", group->name, group->name, isOpen?"Collapse":"Expand", indicator); #else///ifndef BUTTONS_BY_CSS_NOT_HERE - hPrintf("%s  ", + hPrintf("%s  ", group->name, group->name, indicatorImg, indicator,isOpen?"Collapse":"Expand"); #endif///ndef BUTTONS_BY_CSS_NOT_HERE hPrintf(" %s ", group->label); hPrintf("   "); hPrintf("\n"); hPrintf("", + "onClick=\"document.mainForm.%s.value='%s'; %s\" " + "title='Hide all tracks in this groups'>", configHideAll, "hide all", configGroupTarget, group->name, jsSetVerticalPosition("mainForm")); hPrintf(" "); hPrintf("", + "onClick=\"document.mainForm.%s.value='%s'; %s\" " + "title='Show all tracks in this groups'>", configShowAll, "show all", configGroupTarget, group->name, jsSetVerticalPosition("mainForm")); hPrintf(" "); hPrintf("", + "onClick=\"document.mainForm.%s.value='%s'; %s\" " + "title='Show default tracks in this group'>", 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("
"); 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)) - hPrintf("Downloads", // No vis display for downloadsOnly + if (tdbIsDownloadsOnly(tdb)) // No vis display for downloadsOnly + hPrintf("Downloads", hgFileUiName(),cartSessionVarName(), cartSessionId(cart), tdb->track); - else - if (hTrackOnChrom(track->tdb, chromName)) + 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", + rTdbTreeCanPack(track->tdb), + (track->visibility == tvHide) ? "hiddenText" : "normalText", trackDbSetting(track->tdb, "onlyVisibility")); } } else hPrintf("[No data-%s]", chromName); hPrintf(""); hPrintf("%s", tdb->longLabel); hPrintf("
\n"); cgiDown(0.9); } } @@ -296,31 +301,31 @@ // Must find group if (tdb->grp == NULL) continue; for (group = *pGroupList;group != NULL; group = group->next) { if (sameWord(group->name,tdb->grp)) break; } if (group == NULL) continue; // Make the track track = trackFromTrackDb(tdb); track->group = group; - track->groupName = cloneString(group->name); // Don't even bother looking in cart. That junk should be thrown out, now that we have dragReorder + track->groupName = cloneString(group->name); slAddHead(pTrackList,track); count++; } if (count > 0) { // Going to have to make all new group->trackLists slSort(pGroupList, gCmpPriority); for (group = *pGroupList;group != NULL; group = group->next) slFreeList(&group->trackList); // Sort the tracks anew and add each on into it's group. slSort(pTrackList, tgCmpPriority); for (track = *pTrackList; track != NULL; track = track->next) { @@ -344,31 +349,32 @@ { struct dyString *title = dyStringNew(0); char *groupTarget = NULL; struct track *trackList = NULL; struct track *ideoTrack = NULL; struct group *groupList = NULL; withPriorityOverride = cartUsualBoolean(cart, configPriorityOverride, FALSE); /* Get track list and group them. */ ctList = customTracksParseCart(database, cart, &browserLines, &ctFileName); trackList = getTrackList(&groupList, vis); if (trackHash == NULL) trackHash = makeGlobalTrackHash(trackList); -parentChildCartCleanup(trackList,cart,oldVars); // Subtrack settings must be removed when composite/view settings are updated +// Subtrack settings must be removed when composite/view settings are updated +parentChildCartCleanup(trackList,cart,oldVars); addDownloadOnlyTracks(database,&groupList,&trackList); /* The ideogram for some reason is considered a track. * We don't really want to process it as one though, so * we see if it's there, and if necessary remove it. */ ideoTrack = chromIdeoTrack(trackList); if (ideoTrack != NULL) removeTrackFromGroup(ideoTrack); /* Fetch group to change on if any from CGI, * and remove var so it doesn't get used again. */ groupTarget = cloneString(cartUsualString(cart, configGroupTarget, "")); cartRemove(cart, configGroupTarget); if (sameString(groupTarget, "none")) @@ -475,33 +481,36 @@ safef(buf, sizeof buf, "Configure Tracks on %s %s: %s %s (%s)", organization, browserName, organism, freeze, database); webNewSection(buf); hPrintf("Tracks: "); if(isSearchTracksSupported(database,cart)) { cgiMakeButtonWithMsg(TRACK_SEARCH, TRACK_SEARCH_BUTTON,TRACK_SEARCH_HINT); hPrintf(" "); } cgiMakeButtonWithMsg(configHideAll, "hide all","Hide all tracks in this genome assembly"); hPrintf(" "); cgiMakeButtonWithMsg(configShowAll, "show all","Show all tracks in this genome assembly"); hPrintf(" "); cgiMakeButtonWithMsg(configDefaultAll, "default","Display only default tracks"); hPrintf("   Groups: "); -hButtonWithOnClick("hgt.collapseGroups", "collapse all", "Collapse all track groups", "return vis.expandAllGroups(false)"); +hButtonWithOnClick("hgt.collapseGroups", "collapse all", "Collapse all track groups", + "return vis.expandAllGroups(false)"); hPrintf(" "); -hButtonWithOnClick("hgt.expandGroups", "expand all", "Expand all track groups", "return vis.expandAllGroups(true)"); -hPrintf("
Control track and group visibility more selectively below.
"); +hButtonWithOnClick("hgt.expandGroups", "expand all", "Expand all track groups", + "return vis.expandAllGroups(true)"); +hPrintf("
Control track and group visibility " + "more selectively below.
"); trackConfig(trackList, groupList, groupTarget, vis); dyStringFree(&title); freez(&groupTarget); webEndSectionTables(); hPrintf(""); } void configPage() /* Put up configuration page. */ { configPageSetTrackVis(-2); }