From: Jack Allnutt Date: Mon, 7 Nov 2011 11:00:28 +0000 (+0000) Subject: Fixed window sorting X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b16d21f2457d5e6a625d7f61fd312cfc217febbb;p=KiwiIRC.git Fixed window sorting --- 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;