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;
}
// Create the window
$('#kiwi .windows .scroller').append('<div id="' + tmp_divname + '" class="messages"></div>');
- // Create the userlist
+ // Create the window tab
tmp_tab = $('<li id="' + tmp_tabname + '"><span></span></li>');
$('span', tmp_tab).text(v_name);
$('#kiwi .windowlist ul').append(tmp_tab);
tab.show();
}
});
+
+ kiwi.front.sortWindowList();
}
kiwi.front.tabviews[v_name.toLowerCase()] = this;