Merge pull request #2014 from eyesonlyhack/closeExtendedChatWindow
Close extended chat window
This commit is contained in:
commit
74eca43965
|
@ -41,7 +41,7 @@ var chat = (function()
|
||||||
if(!isStuck || fromInitialCall) { // Stick it to
|
if(!isStuck || fromInitialCall) { // Stick it to
|
||||||
padcookie.setPref("chatAlwaysVisible", true);
|
padcookie.setPref("chatAlwaysVisible", true);
|
||||||
$('#chatbox').addClass("stickyChat");
|
$('#chatbox').addClass("stickyChat");
|
||||||
$('#chattext').css({"top":"0px"});
|
$('#titlesticky').hide();
|
||||||
$('#editorcontainer').css({"right":"192px"});
|
$('#editorcontainer').css({"right":"192px"});
|
||||||
$('.stickyChat').css("top",$('#editorcontainer').offset().top+"px");
|
$('.stickyChat').css("top",$('#editorcontainer').offset().top+"px");
|
||||||
isStuck = true;
|
isStuck = true;
|
||||||
|
@ -49,18 +49,25 @@ var chat = (function()
|
||||||
padcookie.setPref("chatAlwaysVisible", false);
|
padcookie.setPref("chatAlwaysVisible", false);
|
||||||
$('.stickyChat').css("top", "auto");
|
$('.stickyChat').css("top", "auto");
|
||||||
$('#chatbox').removeClass("stickyChat");
|
$('#chatbox').removeClass("stickyChat");
|
||||||
$('#chattext').css({"top":"25px"});
|
$('#titlesticky').show();
|
||||||
$('#editorcontainer').css({"right":"0px"});
|
$('#editorcontainer').css({"right":"0px"});
|
||||||
isStuck = false;
|
isStuck = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
hide: function ()
|
hide: function ()
|
||||||
{
|
{
|
||||||
$("#chatcounter").text("0");
|
// decide on hide logic based on chat window being maximized or not
|
||||||
$("#chaticon").show();
|
if ($('#options-stickychat').prop('checked')) {
|
||||||
$("#chatbox").hide();
|
chat.stickToScreen();
|
||||||
$.gritter.removeAll();
|
$('#options-stickychat').prop('checked', false);
|
||||||
$("#gritter-notice-wrapper").show();
|
}
|
||||||
|
else {
|
||||||
|
$("#chatcounter").text("0");
|
||||||
|
$("#chaticon").show();
|
||||||
|
$("#chatbox").hide();
|
||||||
|
$.gritter.removeAll();
|
||||||
|
$("#gritter-notice-wrapper").show();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
scrollDown: function()
|
scrollDown: function()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue