From: Darren Date: Mon, 7 Nov 2011 14:38:48 +0000 (+0000) Subject: Tabview sorting now enabled X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c32b30d65aa0828b40139a22993d38b6ebe35926;p=KiwiIRC.git Tabview sorting now enabled --- diff --git a/client/js/front.js b/client/js/front.js index 4d15bf9..41074a0 100644 --- a/client/js/front.js +++ b/client/js/front.js @@ -466,9 +466,8 @@ kiwi.front = { sortWindowList: function () { var win_list = $('#kiwi .windowlist ul'); var listitems = win_list.children('li').get(); - console.log(Tabview.getServerTab().tab); + listitems.sort(function (a, b) { - console.log(a); if (a == Tabview.getServerTab().tab[0]) { return -1; } @@ -1306,7 +1305,7 @@ var Tabview = function (v_name) { // Create the window $('#kiwi .windows .scroller').append('
'); - // Create the userlist + // Create the window tab tmp_tab = $('
  • '); $('span', tmp_tab).text(v_name); $('#kiwi .windowlist ul').append(tmp_tab); @@ -1316,6 +1315,8 @@ var Tabview = function (v_name) { tab.show(); } }); + + kiwi.front.sortWindowList(); } kiwi.front.tabviews[v_name.toLowerCase()] = this;