diff --git a/public/css/topic.less b/public/css/topic.less index 209010e83e..87664861cc 100644 --- a/public/css/topic.less +++ b/public/css/topic.less @@ -21,6 +21,17 @@ } } + .chat { + display: block; + padding: 3px 20px; + clear: both; + .pointer; + } + .chat:hover, .chat:focus { + color: white; + background-color: rgb(66, 139, 202); + } + .profile-block, .post-block { position: relative; border: 1px solid rgba(0, 0, 0, 0.06); diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index 99582fdba4..7ac7e6338f 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -280,14 +280,14 @@ } }); - $('.post-container').delegate('.chat', 'click', function(e) { - + $('.topic-buttons').delegate('.chat', 'click', function(e) { var username = $(this).parents('li').attr('data-username'); var touid = $(this).parents('li').attr('data-uid'); if(username === app.username || !app.username) return; + require(['chat'], function(chat) { var chatModal = chat.createModalIfDoesntExist(username, touid); chatModal.show(); diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl index af2ce43463..27aabcd57d 100644 --- a/public/templates/topic.tpl +++ b/public/templates/topic.tpl @@ -30,8 +30,8 @@ @@ -98,8 +98,8 @@