status indication
This commit is contained in:
parent
d14afc0ee4
commit
94e59d4770
@ -85,7 +85,17 @@ function chatsvc_content(&$a) {
|
||||
);
|
||||
if($r) {
|
||||
foreach($r as $rr) {
|
||||
$inroom[] = array('img' => zid($rr['xchan_photo_m']), 'img_type' => $rr['xchan_photo_mimetype'],'name' => $rr['xchan_name']);
|
||||
switch($rr['cp_status']) {
|
||||
case 'away':
|
||||
$status = t('Away');
|
||||
break;
|
||||
case 'online':
|
||||
default:
|
||||
$status = t('Online');
|
||||
break;
|
||||
}
|
||||
|
||||
$inroom[] = array('img' => zid($rr['xchan_photo_m']), 'img_type' => $rr['xchan_photo_mimetype'],'name' => $rr['xchan_name'], status => $status);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ function update_inroom(inroom) {
|
||||
var count = inroom.length;
|
||||
$.each( inroom, function(index, item) {
|
||||
var newNode = document.createElement('div');
|
||||
$(newNode).html('<img style="height: 32px; width: 32px;" src="' + item.img + '" alt="' + item.name + '" /><br />' + item.name + '<br/>');
|
||||
$(newNode).html('<img style="height: 32px; width: 32px;" src="' + item.img + '" alt="' + item.name + '" /> ' + item.status + '<br />' + item.name + '<br/>');
|
||||
html.appendChild(newNode);
|
||||
});
|
||||
$('#chatUsers').html(html);
|
||||
|
Reference in New Issue
Block a user