Index: src/hg/hgTracks/config.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/config.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -b -B -U 4 -r1.88 -r1.89
--- src/hg/hgTracks/config.c	7 Jan 2010 23:49:29 -0000	1.88
+++ src/hg/hgTracks/config.c	9 Feb 2010 00:11:35 -0000	1.89
@@ -11,8 +11,9 @@
 #include "customTrack.h"
 #include "hgTracks.h"
 #include "hgConfig.h"
 #include "jsHelper.h"
+#include "imageV2.h"
 
 static void textSizeDropDown()
 /* Create drop down for font size. */
 {
@@ -20,8 +21,9 @@
 cartUsualString(cart, textSizeVar, "small");
 hDropList(textSizeVar, sizes, ArraySize(sizes), tl.textSize);
 }
 
+#ifndef IMAGEv2_DRAG_REORDER
 static void printGroupListHtml(char *groupCgiName, struct group *groupList, char *defaultGroup)
 /* Make an HTML select input listing the groups. */
 {
 char *groups[128];
@@ -43,8 +45,9 @@
 
 cgiMakeDropListFull(groupCgiName, labels, groups, numGroups,
 		    defaultLabel, NULL);
 }
+#endif//ndef IMAGEv2_DRAG_REORDER
 
 static void trackConfig(struct track *trackList, struct group *groupList,
 	char *groupTarget,  int changeVis)
 /* Put up track configurations. If groupTarget is
@@ -52,10 +55,12 @@
  * just set it for the given group.  If vis is -2, then visibility is
  * unchanged.  If -1 then set visibility to default, otherwise it should
  * be tvHide, tvDense, etc. */
 {
+#ifndef IMAGEv2_DRAG_REORDER
 char pname[512];
 char gname[512];
+#endif//ndef IMAGEv2_DRAG_REORDER
 struct group *group;
 boolean showedRuler = FALSE;
 
 setRulerMode();
@@ -124,16 +129,19 @@
      */
     char submitName[256];
     safef(submitName, sizeof(submitName), "%sSubmit", group->name);
     cgiMakeButton(submitName, "submit");
+#ifndef IMAGEv2_DRAG_REORDER
     if (withPriorityOverride)
         {
         hPrintf("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
         hPrintf("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
         hPrintf("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
         hPrintf("%s", wrapWhiteFont("Group Order: "));
         }
+#endif//ndef IMAGEv2_DRAG_REORDER
     hPrintf("</TH>\n");
+#ifndef IMAGEv2_DRAG_REORDER
     if (withPriorityOverride)
         {
         hPrintf("<TH>\n");
         safef(pname, sizeof(pname), "%s.priority",group->name);
@@ -142,8 +150,9 @@
         if (isOpen)
             hPrintf("<TH align=CENTER BGCOLOR=#536ED3><B>&nbsp;%s</B></TH> ", wrapWhiteFont("Group"));
         hPrintf("\n");
         }
+#endif//ndef IMAGEv2_DRAG_REORDER
     hPrintf("</TR>\n");
 
     /* First non-CT group gets ruler. */
     if (!showedRuler && isFirstNotCtGroup &&
@@ -162,15 +171,17 @@
 	hPrintf("</TD>");
 	hPrintf("<TD>");
 	hPrintf("Chromosome position in bases.  (Clicks here zoom in 3x)");
 	hPrintf("</TD>");
+#ifndef IMAGEv2_DRAG_REORDER
         if (withPriorityOverride)
             {
             hPrintf("<TD>");
             hPrintf("</TD>");
             hPrintf("<TD>");
             hPrintf("</TD>");
             }
+#endif//ndef IMAGEv2_DRAG_REORDER
 	hPrintf("</TR>\n");
 	}
     if (differentString(group->name, "user"))
         isFirstNotCtGroup = FALSE;
@@ -178,9 +189,11 @@
      * tracks, and to insert a track in the list for the supertrack.
      * Sort tracks and supertracks together by priority */
     groupTrackListAddSuper(cart, group);
 
+#ifndef IMAGEv2_DRAG_REORDER
     if (!withPriorityOverride)
+#endif//ndef IMAGEv2_DRAG_REORDER
         {
         /* sort hierarchically by priority, considering supertracks */
         struct trackRef *refList = NULL, *ref;
         for (tr = group->trackList; tr != NULL; tr = tr->next)
@@ -264,8 +277,9 @@
 	hPrintf("</TD>");
 	hPrintf("<TD NOWRAP>");
 	hPrintf("%s", track->longLabel);
 	hPrintf("</TD>");
+#ifndef IMAGEv2_DRAG_REORDER
         if (withPriorityOverride)
             {
             hPrintf("<TD>");
             safef(pname, sizeof(pname), "%s.priority",track->mapName);
@@ -281,8 +295,9 @@
                 printGroupListHtml(gname, groupList, track->groupName);
                 }
             hPrintf("</TD>");
             }
+#endif//ndef IMAGEv2_DRAG_REORDER
 	hPrintf("</TR>\n");
 	}
     hTableEnd();
     hPrintf("<BR>");
@@ -299,9 +314,11 @@
 struct track *trackList =  NULL;
 struct track *ideoTrack = NULL;
 struct group *groupList = NULL;
 
+#ifndef IMAGEv2_DRAG_REORDER
 withPriorityOverride = cartUsualBoolean(cart, configPriorityOverride, FALSE);
+#endif//ndef IMAGEv2_DRAG_REORDER
 
 /* Get track list and group them. */
 ctList = customTracksParseCart(database, cart, &browserLines, &ctFileName);
 trackList = getTrackList(&groupList, vis);
@@ -404,15 +421,17 @@
 hPrintf("</TD><TD>");
 hPrintf("Next/previous exon navigation");
 hPrintf("</TD></TR>\n");
 
+#ifndef IMAGEv2_DRAG_REORDER
 hPrintf("<TR><TD>");
 char *javascript="onClick=\"document.mainForm.hgTracksConfigPage.value='configure';document.mainForm.submit();\"";
 hCheckBoxJS(configPriorityOverride,
 	cartUsualBoolean(cart, configPriorityOverride , FALSE), javascript);
 hPrintf("</TD><TD>");
 hPrintf("Enable track re-ordering");
 hPrintf("</TD></TR>\n");
+#endif//ndef IMAGEv2_DRAG_REORDER
 
 hPrintf("<TR><TD>");
 hCheckBox("enableAdvancedJavascript", advancedJavascriptFeaturesEnabled(cart));
 hPrintf("</TD><TD>");

