From 5d98913cc3fa7d3555a6d54cf10dd0f6ac6ceca9 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Mon, 12 Sep 2011 16:42:10 +0000 Subject: [PATCH] Working on chat. --- gemp-lotr/gemp-lotr-web/src/main/webapp/js/chat.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/chat.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/chat.js index aecac7d03..cdf9f8575 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/chat.js +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/chat.js @@ -45,6 +45,16 @@ var ChatBoxUI = Class.extend({ var text = message.childNodes[0].nodeValue; this.appendMessage("" + from + ":" + text); } + + setTimeout(this.updateChatMessages, 1000); } + }, + + updateChatMessages: function(xml) { + var that = this; + + this.communication.updateChat(this.name, function(xml) { + that.processMessages(xml); + }); } }); \ No newline at end of file