From e612aa10c6a5daa921cc1fce29b89619cd81fb2a Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 15 Dec 2015 19:06:05 +0200 Subject: [PATCH] changes to chats tpl --- lib/client/chats.js | 6 +++--- templates/chats.tpl | 19 ++++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/lib/client/chats.js b/lib/client/chats.js index 39871f9..7ef4e58 100644 --- a/lib/client/chats.js +++ b/lib/client/chats.js @@ -2,12 +2,12 @@ define('persona/chats', ['components', 'forum/chats'], function(components, core var Chats = {}; Chats.init = function() { - components.get('chat/recent').off('click').on('click', 'li', function(e) { + components.get('chat/recent').off('click').on('click', '[component="chat/recent/room"]', function(e) { var env = utils.findBootstrapEnvironment(); if (env === 'xs' || env === 'sm') { - app.openChat($(this).attr('data-username'), $(this).attr('data-uid')); + app.openChat($(this).attr('data-roomid')); } else { - coreChats.switchChat(parseInt($(this).attr('data-uid'), 10), $(this).attr('data-username')); + coreChats.switchChat($(this).attr('data-roomid')); } }); }; diff --git a/templates/chats.tpl b/templates/chats.tpl index 1925754..bc122cd 100644 --- a/templates/chats.tpl +++ b/templates/chats.tpl @@ -4,12 +4,13 @@
    - + +
    + - - - - + +
    +
@@ -19,11 +20,11 @@ [[error:chat-restricted]]
- -
+ +
-

{meta.username}

+

{usernames}

[[recent:title]][[modules:chat.seven_days]][[modules:chat.thirty_days]][[modules:chat.three_months]] @@ -41,6 +42,6 @@
[[modules:chat.no-messages]]
- +