From b16d21f2457d5e6a625d7f61fd312cfc217febbb Mon Sep 17 00:00:00 2001 From: Jack Allnutt Date: Mon, 7 Nov 2011 11:00:28 +0000 Subject: [PATCH] Fixed window sorting --- client/js/front.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/js/front.js b/client/js/front.js index 703eec8..9e1d833 100644 --- a/client/js/front.js +++ b/client/js/front.js @@ -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; -- 2.25.1