mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Sending conf as own message instead of with the list
This commit is contained in:
@@ -12,14 +12,10 @@ var List = {
|
||||
if(msg[0] == "list")
|
||||
{
|
||||
full_playlist = msg[1];
|
||||
var index_of_conf = List.getIndexOfConf(full_playlist);
|
||||
conf = full_playlist[index_of_conf];
|
||||
full_playlist.splice(index_of_conf, 1);
|
||||
full_playlist.sort(Helper.predicate({
|
||||
name: 'votes',
|
||||
reverse: true
|
||||
name: 'votes',
|
||||
reverse: true
|
||||
}, 'added'));
|
||||
Admin.set_conf(conf);
|
||||
List.populate_list(full_playlist);
|
||||
}else if(msg[0] == "added")
|
||||
{
|
||||
@@ -217,15 +213,5 @@ var List = {
|
||||
}
|
||||
});
|
||||
return indexes[0];
|
||||
},
|
||||
|
||||
getIndexOfConf: function(flist)
|
||||
{
|
||||
indexes = $.map(flist, function(obj, index) {
|
||||
if("views" in obj) {
|
||||
return index;
|
||||
}
|
||||
});
|
||||
return indexes[0];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user