aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/chat.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl/chat.tpl')
-rw-r--r--view/tpl/chat.tpl7
1 files changed, 5 insertions, 2 deletions
diff --git a/view/tpl/chat.tpl b/view/tpl/chat.tpl
index 19b3425da..0ebe879a1 100644
--- a/view/tpl/chat.tpl
+++ b/view/tpl/chat.tpl
@@ -1,3 +1,4 @@
+<h1>{{$room_name}}</h1>
<div id="chatContainer" style="height: 100%; width: 100%;">
<div id="chatTopBar" style="float: left; height: 400px; width: 650px; overflow-y: auto;">
@@ -65,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 + '" />');
+ $(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);
@@ -77,8 +78,10 @@ function update_chats(chats) {
$.each( chats, function(index, item) {
last_chat = item.id;
var newNode = document.createElement('div');
- $(newNode).html('<div style="margin-bottom: 5px; clear: both;"><img style="height: 32px; width: 32px; float: left;" src="' + item.img + '" alt="' + item.name + '" /><div class="chat-body; style="float: left; width: 80%;">' + item.text + '</div></div>');
+ $(newNode).html('<div style="margin-bottom: 5px; clear: both;"><img style="height: 32px; width: 32px; float: left;" src="' + item.img + '" alt="' + item.name + '" /><div class="chat-body" style="float: left; width: 80%; margin-left: 15px; font-size: 14px;">' + item.name + ' <span class="autotime" title="' + item.isotime + '">' + item.localtime + '</span><br />' + item.text + '</div></div>');
$('#chatLineHolder').append(newNode);
+ $(".autotime").timeago();
+
});
var elem = document.getElementById('chatTopBar');
elem.scrollTop = elem.scrollHeight;