ea1adb539e0356930cce52e050e76aa25828f6c0
tdreszer
  Fri Jan 10 11:22:17 2014 -0800
Fixed hgTracks image track sorting bug reported in redmine #12455
diff --git src/hg/js/utils.js src/hg/js/utils.js
index 1065bb0..3fab845 100644
--- src/hg/js/utils.js
+++ src/hg/js/utils.js
@@ -1420,31 +1420,31 @@
     },
 
     rowCmp: function (a,b)  // UNUSED: sortTable.fieldCmp works fine
     {
         for(var ix=0;ix<a.fields.length;ix++) {
             if (a.fields[ix] > b.fields[ix])
                 return (a.reverse[ix] ? -1:1);
             else if (a.fields[ix] < b.fields[ix])
                 return (a.reverse[ix] ? 1:-1);
         }
         return 0;
     },
 
     field: function (value,reverse,row)
     {
-        if (sortTable.caseSensitive) 
+        if (sortTable.caseSensitive || typeof(value) != 'string') 
             this.value   = value;
         else
             this.value   = value.toLowerCase(); // case insensitive sorts
         this.reverse = reverse;
         this.row     = row;
     },
 
     fieldCmp: function (a,b)
     {
         if (a.value > b.value)
             return (a.reverse ? -1:1);
         else if (a.value < b.value)
             return (a.reverse ? 1:-1);
         return 0;
     },