working logic

This commit is contained in:
John McLear 2015-01-21 16:08:54 +00:00
parent 17fa87552d
commit 753e8fdf0b
2 changed files with 6 additions and 4 deletions

View file

@ -54,16 +54,17 @@ var chat = (function()
isStuck = false;
}
},
chatAndUsers: function(status){
if(status || $('#options-chatandusers').prop('checked')){
chatAndUsers: function(fromInitialCall)
{
if(fromInitialCall || $('#options-chatandusers').prop('checked')){
padcookie.setPref("chatAndUsers", true);
chat.stickToScreen(true);
$('#options-stickychat').prop('checked', true)
$('#options-stickychat').prop("disabled", "disabled");
$('#users').addClass("chatAndUsers");
$("#chatbox").addClass("chatAndUsersChat");
}else{
padcookie.setPref("chatAndUsers", false);
chat.stickToScreen(false);
$('#options-stickychat').prop("disabled", false);
$('#users').removeClass("chatAndUsers");
$("#chatbox").removeClass("chatAndUsersChat");