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