From bbb045698d954112086fe2abcec9f057a0efbc13 Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Mon, 4 Nov 2013 12:37:06 -0500 Subject: [PATCH] closes #481 --- public/src/app.js | 1 + public/src/modules/chat.js | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/src/app.js b/public/src/app.js index eb4cf4a028..026c66496c 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -339,6 +339,7 @@ var socket, chatModal = chat.getModal(touid); } chat.load(chatModal.attr('UUID')); + chat.center(chatModal); }); } diff --git a/public/src/modules/chat.js b/public/src/modules/chat.js index aad7331faf..7239b20db7 100644 --- a/public/src/modules/chat.js +++ b/public/src/modules/chat.js @@ -85,7 +85,7 @@ define(['taskbar'], function(taskbar) { return chatModal; } - function center(chatModal) { + module.center = function(chatModal) { chatModal.css("position", "fixed"); chatModal.css("top", "100px"); chatModal.css("left", Math.max(0, (($(window).width() - $(chatModal).outerWidth()) / 2) + $(window).scrollLeft()) + "px"); @@ -95,7 +95,6 @@ define(['taskbar'], function(taskbar) { module.load = function(uuid) { var chatModal = $('div[UUID="'+uuid+'"]'); chatModal.show(); - center(chatModal); module.bringModalToTop(chatModal); checkOnlineStatus(chatModal); }