diff --git a/view/tpl/chat.tpl b/view/tpl/chat.tpl index 19b3425da..420430550 100644 --- a/view/tpl/chat.tpl +++ b/view/tpl/chat.tpl @@ -65,7 +65,7 @@ function update_inroom(inroom) { var count = inroom.length; $.each( inroom, function(index, item) { var newNode = document.createElement('div'); - $(newNode).html('' + item.name + ''); + $(newNode).html('' + item.name + '
' + item.name + '
'); html.appendChild(newNode); }); $('#chatUsers').html(html); @@ -77,8 +77,10 @@ function update_chats(chats) { $.each( chats, function(index, item) { last_chat = item.id; var newNode = document.createElement('div'); - $(newNode).html('
' + item.name + '
' + item.text + '
'); + $(newNode).html('
' + item.name + '
' + item.name + ' ' + item.localtime + '
' + item.text + '
'); $('#chatLineHolder').append(newNode); + $(".autotime").timeago(); + }); var elem = document.getElementById('chatTopBar'); elem.scrollTop = elem.scrollHeight;