Add different userlist sort options

This commit is contained in:
calzoneman 2013-08-08 10:54:07 -04:00
parent 425aa75165
commit c7501bfd50
1 changed files with 5 additions and 8 deletions

View File

@ -626,15 +626,8 @@ Callbacks = {
var nametag = $("<span/>").text(data.name).appendTo(div);
formatUserlistItem(div, data);
addUserDropdown(div, data);
var users = $("#userlist").children();
for(var i = 0; i < users.length; i++) {
var othername = users[i].children[1].innerHTML;
if(othername.toLowerCase() > data.name.toLowerCase()) {
div.insertBefore(users[i]);
return;
}
}
div.appendTo($("#userlist"));
sortUserlist();
},
updateUser: function(data) {
@ -668,6 +661,8 @@ Callbacks = {
var user = $(".userlist-" + data.name);
formatUserlistItem(user, data);
addUserDropdown(user, data);
if(USEROPTS.sort_rank)
sortUserlist();
},
setAFK: function (data) {
@ -679,6 +674,8 @@ Callbacks = {
.appendTo(user[0].children[0]);
$(user[0].children[1]).css("font-style", "italic");
}
if(USEROPTS.sort_afk)
sortUserlist();
},
userLeave: function(data) {