Fixed window sorting
authorJack Allnutt <m2ys4u@Gmail.com>
Mon, 7 Nov 2011 11:00:28 +0000 (11:00 +0000)
committerJack Allnutt <m2ys4u@Gmail.com>
Mon, 7 Nov 2011 11:00:28 +0000 (11:00 +0000)
client/js/front.js

index 703eec8d08a7b586aabadbd755c4f37cee7af8e4..9e1d833f3b82884db8f147e5b7fe599ba7f21249 100644 (file)
@@ -470,12 +470,12 @@ kiwi.front = {
         console.log(Tabview.getServerTab().tab);
         listitems.sort(function (a, b) {
             console.log(a);
-            if (a == Tabview.getServerTab().tab) {
-                return 1;
-            }
-            if (b == Tabview.getServerTab().tab) {
+            if (a == Tabview.getServerTab().tab[0]) {
                 return -1;
             }
+            if (b == Tabview.getServerTab().tab[0]) {
+                return 1;
+            }
             var compA = $(a).text().toUpperCase();
             var compB = $(b).text().toUpperCase();
             return (compA < compB) ? -1 : (compA > compB) ? 1 : 0;