Commit da034f1c authored by Markus Bergt's avatar Markus Bergt

added client side status list

parent c504c623
......@@ -12,7 +12,21 @@ $(document).ready(function() {
var obj = jQuery.parseJSON(data);
if(!!obj.UsersTable)
{
$('#onlineStatus').html(obj.UsersTable);
$('#onlineStatus').html('');
$('#onlineStatus').append('<tr><th>Nutzername</th><th>Rang</th></tr>');
obj.UserTable.each(function(){
if(this.status =='online')
{
$('#onlineStatus').append('<tr><td class="online"><b>'+ this.name +'</b></td><td class="online">'+ this.rang +'</td></tr>');
}
});
$('#onlineStatus').append('<tr><td>&nbsp;</td><td>&nbsp;</td></tr>');
obj.UserTable.each(function(){
if(this.status =='offline')
{
$('#onlineStatus').append('<tr><td class="offline"><b>'+ this.name +'</b></td><td class="offline">'+ this.rang +'</td></tr>');
}
});
}
if(!!obj.newMessages)
{
......@@ -33,9 +47,6 @@ $(document).ready(function() {
$('#sendMessage').click(function(event){
event.preventDefault();
var obj = $.post( "send.php", $( "#chatbar" ).serialize() );
obj.done(function(data){
alert(data);
});
$('#chatbar')[0].reset();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment