cfd7a1de973f51e661c5974e25939884b903db73 tdreszer Wed Aug 25 12:49:42 2010 -0700 Drag reorder did nto respect old group reordering or moves from one group to another. This is a fix. NOTE, the ugly ifdefs should be cleaned up soon when all dragReorder ifdefs are cleaned up diff --git src/hg/hgTracks/config.c src/hg/hgTracks/config.c index d1f4e0a..4163a83 100644 --- src/hg/hgTracks/config.c +++ src/hg/hgTracks/config.c @@ -22,7 +22,7 @@ hDropList(textSizeVar, sizes, ArraySize(sizes), tl.textSize); } -#ifndef IMAGEv2_DRAG_REORDER +#ifndef IMAGEv2_DRAG_REORDER_NOPRIORITY static void printGroupListHtml(char *groupCgiName, struct group *groupList, char *defaultGroup) /* Make an HTML select input listing the groups. */ { @@ -46,7 +46,7 @@ cgiMakeDropListFull(groupCgiName, labels, groups, numGroups, defaultLabel, NULL); } -#endif//ndef IMAGEv2_DRAG_REORDER +#endif///ndef IMAGEv2_DRAG_REORDER_NOPRIORITY static void trackConfig(struct track *trackList, struct group *groupList, char *groupTarget, int changeVis) @@ -56,10 +56,10 @@ * unchanged. If -1 then set visibility to default, otherwise it should * be tvHide, tvDense, etc. */ { -#ifndef IMAGEv2_DRAG_REORDER +#ifndef IMAGEv2_DRAG_REORDER_NOPRIORITY char pname[512]; char gname[512]; -#endif//ndef IMAGEv2_DRAG_REORDER +#endif///ndef IMAGEv2_DRAG_REORDER_NOPRIORITY struct group *group; boolean showedRuler = FALSE; @@ -130,7 +130,7 @@ char submitName[256]; safef(submitName, sizeof(submitName), "%sSubmit", group->name); cgiMakeButton(submitName, "submit"); -#ifndef IMAGEv2_DRAG_REORDER +#ifndef IMAGEv2_DRAG_REORDER_NOPRIORITY if (withPriorityOverride) { hPrintf("      "); @@ -138,9 +138,9 @@ hPrintf("      "); hPrintf("%s", wrapWhiteFont("Group Order: ")); } -#endif//ndef IMAGEv2_DRAG_REORDER +#endif///ndef IMAGEv2_DRAG_REORDER_NOPRIORITY hPrintf("\n"); -#ifndef IMAGEv2_DRAG_REORDER +#ifndef IMAGEv2_DRAG_REORDER_NOPRIORITY if (withPriorityOverride) { hPrintf("\n"); @@ -151,7 +151,7 @@ hPrintf(" %s ", wrapWhiteFont("Group")); hPrintf("\n"); } -#endif//ndef IMAGEv2_DRAG_REORDER +#endif///ndef IMAGEv2_DRAG_REORDER_NOPRIORITY hPrintf("\n"); /* First non-CT group gets ruler. */ @@ -172,7 +172,7 @@ hPrintf(""); hPrintf("Chromosome position in bases. (Clicks here zoom in 3x)"); hPrintf(""); -#ifndef IMAGEv2_DRAG_REORDER +#ifndef IMAGEv2_DRAG_REORDER_NOPRIORITY if (withPriorityOverride) { hPrintf(""); @@ -180,7 +180,7 @@ hPrintf(""); hPrintf(""); } -#endif//ndef IMAGEv2_DRAG_REORDER +#endif///ndef IMAGEv2_DRAG_REORDER_NOPRIORITY hPrintf("\n"); } if (differentString(group->name, "user")) @@ -190,9 +190,9 @@ * Sort tracks and supertracks together by priority */ groupTrackListAddSuper(cart, group); -#ifndef IMAGEv2_DRAG_REORDER +#if !defined(IMAGEv2_DRAG_REORDER_NOPRIORS) || !defined(IMAGEv2_DRAG_REORDER_NOPRIORITY) if (!withPriorityOverride) -#endif//ndef IMAGEv2_DRAG_REORDER +#endif/// !defined(IMAGEv2_DRAG_REORDER_NOPRIORS) || !defined(IMAGEv2_DRAG_REORDER_NOPRIORITY) { /* sort hierarchically by priority, considering supertracks */ struct trackRef *refList = NULL, *ref; @@ -278,7 +278,7 @@ hPrintf(""); hPrintf("%s", track->longLabel); hPrintf(""); -#ifndef IMAGEv2_DRAG_REORDER +#ifndef IMAGEv2_DRAG_REORDER_NOPRIORITY if (withPriorityOverride) { hPrintf(""); @@ -296,7 +296,7 @@ } hPrintf(""); } -#endif//ndef IMAGEv2_DRAG_REORDER +#endif///ndef IMAGEv2_DRAG_REORDER_NOPRIORITY hPrintf("\n"); } hTableEnd(); @@ -315,9 +315,9 @@ struct track *ideoTrack = NULL; struct group *groupList = NULL; -#ifndef IMAGEv2_DRAG_REORDER +#if !defined(IMAGEv2_DRAG_REORDER_NOPRIORS) || !defined(IMAGEv2_DRAG_REORDER_NOPRIORITY) withPriorityOverride = cartUsualBoolean(cart, configPriorityOverride, FALSE); -#endif//ndef IMAGEv2_DRAG_REORDER +#endif/// !defined(IMAGEv2_DRAG_REORDER_NOPRIORS) || !defined(IMAGEv2_DRAG_REORDER_NOPRIORITY) /* Get track list and group them. */ ctList = customTracksParseCart(database, cart, &browserLines, &ctFileName); @@ -422,7 +422,7 @@ hPrintf("Next/previous exon navigation"); hPrintf("\n"); -#ifndef IMAGEv2_DRAG_REORDER +#ifndef IMAGEv2_DRAG_REORDER_NOPRIORITY hPrintf(""); char *javascript="onClick=\"document.mainForm.hgTracksConfigPage.value='configure';document.mainForm.submit();\""; hCheckBoxJS(configPriorityOverride, @@ -430,7 +430,7 @@ hPrintf(""); hPrintf("Enable track re-ordering"); hPrintf("\n"); -#endif//ndef IMAGEv2_DRAG_REORDER +#endif///ndef IMAGEv2_DRAG_REORDER_NOPRIORITY hPrintf(""); hCheckBox("enableAdvancedJavascript", advancedJavascriptFeaturesEnabled(cart));