make chat honour the pause key (but we still need to ping the server to maintain the in_room status), also the recent change to pull css out of the template file used classes instead of ids so none of the styles were sticking
This commit is contained in:
parent
02e4527de6
commit
67899677db
@ -56,6 +56,7 @@ function chatsvc_content(&$a) {
|
||||
|
||||
$status = strip_tags($_REQUEST['status']);
|
||||
$room_id = intval($a->data['chat']['room_id']);
|
||||
$stopped = ((x($_REQUEST,'stopped') && intval($_REQUEST['stopped'])) ? true : false);
|
||||
|
||||
if($status && $room_id) {
|
||||
|
||||
@ -74,6 +75,7 @@ function chatsvc_content(&$a) {
|
||||
goaway(z_root() . '/chat/' . $x[0]['channel_address'] . '/' . $room_id);
|
||||
}
|
||||
|
||||
if(! $stopped) {
|
||||
|
||||
$lastseen = intval($_REQUEST['last']);
|
||||
|
||||
@ -128,6 +130,7 @@ function chatsvc_content(&$a) {
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$r = q("update chatpresence set cp_last = '%s' where cp_room = %d and cp_xchan = '%s' and cp_client = '%s' limit 1",
|
||||
dbesc(datetime_convert()),
|
||||
@ -137,9 +140,10 @@ function chatsvc_content(&$a) {
|
||||
);
|
||||
|
||||
$ret['success'] = true;
|
||||
if(! $stopped) {
|
||||
$ret['inroom'] = $inroom;
|
||||
$ret['chats'] = $chats;
|
||||
|
||||
}
|
||||
json_return_and_die($ret);
|
||||
|
||||
}
|
||||
|
@ -1,23 +1,23 @@
|
||||
.chatContainer {
|
||||
#chatContainer {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.chatTopBar {
|
||||
#chatTopBar {
|
||||
float: left;
|
||||
height: 400px;
|
||||
width: 650px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.chatUsers {
|
||||
#chatUsers {
|
||||
float: right;
|
||||
width: 120px;
|
||||
height: 100%;
|
||||
border: 1px solid #000;
|
||||
}
|
||||
|
||||
.chatBottomBar {
|
||||
#chatBottomBar {
|
||||
position: relative;
|
||||
bottom: 0;
|
||||
height: 150px;
|
||||
|
@ -47,8 +47,8 @@ $('#chat-form').submit(function(ev) {
|
||||
|
||||
function load_chats() {
|
||||
|
||||
$.get("chatsvc?f=&room_id=" + room_id + '&last=' + last_chat,function(data) {
|
||||
if(data.success) {
|
||||
$.get("chatsvc?f=&room_id=" + room_id + '&last=' + last_chat + ((stopped) ? '&stopped=1' : ''),function(data) {
|
||||
if(data.success && (! stopped)) {
|
||||
update_inroom(data.inroom);
|
||||
update_chats(data.chats);
|
||||
}
|
||||
|
Reference in New Issue
Block a user