mirror of https://github.com/calzoneman/sync.git
Add setLeader callback
This commit is contained in:
parent
6588e90bfe
commit
7fc50db879
|
@ -679,6 +679,18 @@ Callbacks = {
|
|||
sortUserlist();
|
||||
},
|
||||
|
||||
setLeader: function (name) {
|
||||
$(".userlist_item").each(function () {
|
||||
$(this).find(".icon-star-empty").remove();
|
||||
});
|
||||
if (name === "")
|
||||
return;
|
||||
var user = findUserlistItem(name);
|
||||
if (user) {
|
||||
$("<i/>").addClass("icon-star-empty").prependTo(user.children()[0]);
|
||||
}
|
||||
},
|
||||
|
||||
updateUser: function(data) {
|
||||
if(data.name == CLIENT.name) {
|
||||
CLIENT.leader = data.leader;
|
||||
|
|
Loading…
Reference in New Issue