v1.18.x
Baris Usakli 11 years ago
parent d9e364cd86
commit bbb045698d

@ -339,6 +339,7 @@ var socket,
chatModal = chat.getModal(touid); chatModal = chat.getModal(touid);
} }
chat.load(chatModal.attr('UUID')); chat.load(chatModal.attr('UUID'));
chat.center(chatModal);
}); });
} }

@ -85,7 +85,7 @@ define(['taskbar'], function(taskbar) {
return chatModal; return chatModal;
} }
function center(chatModal) { module.center = function(chatModal) {
chatModal.css("position", "fixed"); chatModal.css("position", "fixed");
chatModal.css("top", "100px"); chatModal.css("top", "100px");
chatModal.css("left", Math.max(0, (($(window).width() - $(chatModal).outerWidth()) / 2) + $(window).scrollLeft()) + "px"); 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) { module.load = function(uuid) {
var chatModal = $('div[UUID="'+uuid+'"]'); var chatModal = $('div[UUID="'+uuid+'"]');
chatModal.show(); chatModal.show();
center(chatModal);
module.bringModalToTop(chatModal); module.bringModalToTop(chatModal);
checkOnlineStatus(chatModal); checkOnlineStatus(chatModal);
} }

Loading…
Cancel
Save