Fix layouts breaking chat

This commit is contained in:
calzoneman 2013-03-31 20:10:57 -05:00
parent c97e6f3f84
commit 28b9bdb54d
1 changed files with 64 additions and 58 deletions

View File

@ -61,7 +61,7 @@ if(window.location.search) {
}
if(params["novideo"] != undefined) {
$(".span7").remove();
$("#videodiv").remove();
}
if(params["channel"] == undefined) {
@ -197,6 +197,7 @@ $("#register").click(function() {
});
});
function initChatCallback() {
$("#chatline").keydown(function(ev) {
if(ev.keyCode == 13 && $("#chatline").val() != "") {
socket.emit("chatMsg", {
@ -256,9 +257,11 @@ $("#chatline").keydown(function(ev) {
return false;
}
});
$("#messagebuffer").mouseenter(function() { SCROLLCHAT = false; });
$("#messagebuffer").mouseleave(function() { SCROLLCHAT = true; });
}
initChatCallback();
$("#opt_submit").click(function() {
var ptitle = $("#opt_pagetitle").val();
@ -320,6 +323,7 @@ function largeLayout() {
chat.removeClass().addClass("span8 offset2").appendTo(r);
$("#userlist").css("width", "200px");
//$("#chatline").css("width", "756px");
initChatCallback();
}
function hugeLayout() {
@ -335,6 +339,7 @@ function hugeLayout() {
$("#userlist").css("width", "200px").css("height", "200px");
$("#messagebuffer").css("height", "200px");
//$("#chatline").css("width", "1156px");
initChatCallback();
}
function narrowLayout() {
@ -349,6 +354,7 @@ function narrowLayout() {
chat.removeClass().addClass("span6").appendTo(r);
$("#userlist").css("width", "150px");
//$("#chatline").css("width", "556px");
initChatCallback();
}
function synchtubeLayout() {