From 676765278e101660e290203bb023ef3c97cc386a Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Mon, 22 Jul 2013 11:16:16 -0400 Subject: [PATCH] closes #111 --- public/src/forum/footer.js | 1 - public/src/forum/topic.js | 2 +- public/src/modules/chat.js | 2 +- public/templates/topic.tpl | 4 ++-- src/websockets.js | 3 ++- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/src/forum/footer.js b/public/src/forum/footer.js index 6d6341962e..d38896cce9 100644 --- a/public/src/forum/footer.js +++ b/public/src/forum/footer.js @@ -145,7 +145,6 @@ socket.on('chatMessage', function(data) { - var username = data.username; var fromuid = data.fromuid; var message = data.message; diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index 5d7ed4226c..3c329ee713 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -316,7 +316,7 @@ 'event:topic_deleted', 'event:topic_restored', 'event:topic:locked', 'event:topic_unlocked', 'event:topic_pinned', 'event:topic_unpinned', 'event:topic_moved', 'event:post_edited', 'event:post_deleted', 'event:post_restored', - 'api:posts.favourite', 'chatMessage' + 'api:posts.favourite' ]); diff --git a/public/src/modules/chat.js b/public/src/modules/chat.js index f633c55d82..7c866fcce4 100644 --- a/public/src/modules/chat.js +++ b/public/src/modules/chat.js @@ -35,7 +35,7 @@ define(['taskbar'], function(taskbar) { taskbar.discard('chat', uuid); }); - chatModal.on('click', function(e){ + chatModal.on('click', function(e) { module.bringModalToTop(chatModal); }); diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl index 397d3a8f59..ea5c412a42 100644 --- a/public/templates/topic.tpl +++ b/public/templates/topic.tpl @@ -60,7 +60,7 @@
{main_posts.signature}
- posted by {main_posts.username} {main_posts.relativeTime} ago + posted by {main_posts.username} {main_posts.relativeTime} ago | last edited by {main_posts.editorname} {main_posts.relativeEditTime} ago
@@ -100,7 +100,7 @@ - posted by {posts.username} {posts.relativeTime} ago + posted by {posts.username} {posts.relativeTime} ago | last edited by {posts.editorname} {posts.relativeEditTime} ago
diff --git a/src/websockets.js b/src/websockets.js index 5cc3f1743c..5d2c51abd9 100644 --- a/src/websockets.js +++ b/src/websockets.js @@ -429,6 +429,7 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }), }); socket.on('sendChatMessage', function(data) { + var touid = data.touid; if(userSockets[touid]) { @@ -441,7 +442,7 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }), for(var x=0;x