6333eadd4ea8c01f45f94086350c76861063c059
larrym
  Mon Nov 15 11:55:00 2010 -0800
support codon numbering checkbox in hgTrackUi
diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index f6b43e7..8e649aa 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -1031,40 +1031,48 @@
 if (gotCds && gotSeq)
     {
     puts("<P><B>Color track by codons or bases:</B>");
     cgiMakeDropListFull(var, baseColorDrawAllOptionLabels,
 			baseColorDrawAllOptionValues,
 			ArraySize(baseColorDrawAllOptionLabels),
 			curValue, NULL);
 #ifndef BAM_CFG_UI_CHANGES
     printf("<BR>");
 #endif///ndef BAM_CFG_UI_CHANGES
     printf("<A HREF=\"%s\">Help on mRNA coloring</A><BR>",
 	   CDS_MRNA_HELP_PAGE);
     }
 else if (gotCds)
     {
+    char buf[256];
+    char *disabled = NULL;
+    safef(buf, sizeof(buf), "onchange='codonColoringChanged(\"%s\")'", name);
     puts("<P><B>Color track by codons:</B>");
     cgiMakeDropListFull(var, baseColorDrawGenomicOptionLabels,
 			baseColorDrawGenomicOptionValues,
 			ArraySize(baseColorDrawGenomicOptionLabels),
-			curValue, NULL);
+			curValue, buf);
 #ifndef BAM_CFG_UI_CHANGES
     printf("<BR>");
 #endif///ndef BAM_CFG_UI_CHANGES
     printf("<A HREF=\"%s\">Help on codon coloring</A><BR>",
 	   CDS_HELP_PAGE);
+    safef(buf, sizeof(buf), "%s.%s", name, CODON_NUMBERING_SUFFIX);
+    puts("<br /><b>Show codon numbering</b>:\n");
+    if(curOpt == baseColorDrawOff)
+        disabled = "disabled";
+    cgiMakeCheckBoxJS(buf, cartUsualBoolean(cart, buf, FALSE), disabled);
     }
 else if (gotSeq)
     {
     puts("<P><B>Color track by bases:</B>");
     cgiMakeDropListFull(var, baseColorDrawItemOptionLabels,
 			baseColorDrawItemOptionValues,
 			ArraySize(baseColorDrawItemOptionLabels),
 			curValue, NULL);
 #ifndef BAM_CFG_UI_CHANGES
     printf("<BR>");
 #endif///ndef BAM_CFG_UI_CHANGES
     printf("<A HREF=\"%s\">Help on base coloring</A><BR>",
 	   CDS_BASE_HELP_PAGE);
     }
 }