Better fix for previous commit

This commit is contained in:
calzoneman 2013-03-31 20:29:39 -05:00
parent 28b9bdb54d
commit a0c26ee0e5
1 changed files with 61 additions and 67 deletions

View File

@ -197,7 +197,6 @@ $("#register").click(function() {
});
});
function initChatCallback() {
$("#chatline").keydown(function(ev) {
if(ev.keyCode == 13 && $("#chatline").val() != "") {
socket.emit("chatMsg", {
@ -259,8 +258,6 @@ function initChatCallback() {
});
$("#messagebuffer").mouseenter(function() { SCROLLCHAT = false; });
$("#messagebuffer").mouseleave(function() { SCROLLCHAT = true; });
}
initChatCallback();
$("#opt_submit").click(function() {
@ -316,14 +313,13 @@ function largeLayout() {
VWIDTH = "770";
VHEIGHT = "430";
$("#ytapiplayer").attr("width", "770").attr("height", "430");
var chat = $("#chatdiv").remove();
var chat = $("#chatdiv").detach();
$("#layoutrow").remove();
var r = $("<div />").addClass("row").insertAfter($(".row")[1]);
r.attr("id", "layoutrow");
chat.removeClass().addClass("span8 offset2").appendTo(r);
$("#userlist").css("width", "200px");
//$("#chatline").css("width", "756px");
initChatCallback();
}
function hugeLayout() {
@ -331,7 +327,7 @@ function hugeLayout() {
VHEIGHT = "658";
$("#videodiv").removeClass().addClass("span12");
$("#ytapiplayer").attr("width", "1170").attr("height", "658");
var chat = $("#chatdiv").remove();
var chat = $("#chatdiv").detach();
$("#layoutrow").remove();
var r = $("<div />").addClass("row").insertAfter($(".row")[1]);
r.attr("id", "layoutrow");
@ -339,7 +335,6 @@ function hugeLayout() {
$("#userlist").css("width", "200px").css("height", "200px");
$("#messagebuffer").css("height", "200px");
//$("#chatline").css("width", "1156px");
initChatCallback();
}
function narrowLayout() {
@ -347,18 +342,17 @@ function narrowLayout() {
VHEIGHT = "321";
$("#videodiv").removeClass().addClass("span6");
$("#ytapiplayer").attr("width", "570").attr("height", "321");
var chat = $("#chatdiv").remove();
var chat = $("#chatdiv").detach();
$("#layoutrow").remove();
var r = $("<div />").addClass("row").insertAfter($(".row")[1]);
r.attr("id", "layoutrow");
chat.removeClass().addClass("span6").appendTo(r);
$("#userlist").css("width", "150px");
//$("#chatline").css("width", "556px");
initChatCallback();
}
function synchtubeLayout() {
$("#videodiv").remove().insertBefore($("#chatdiv"));
$("#videodiv").detach().insertBefore($("#chatdiv"));
}
function onYouTubeIframeAPIReady() {