mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-20 14:39:53 +01:00
Added a way to closed the extended chat window
This commit is contained in:
parent
a120d78b7e
commit
383a216a7d
2 changed files with 16 additions and 4 deletions
|
@ -41,15 +41,15 @@ var chat = (function()
|
|||
if(!isStuck || fromInitialCall) { // Stick it to
|
||||
padcookie.setPref("chatAlwaysVisible", true);
|
||||
$('#chatbox').addClass("stickyChat");
|
||||
$('#chattext').css({"top":"0px"});
|
||||
$('#titlesticky').hide();
|
||||
$('#editorcontainer').css({"right":"192px"});
|
||||
isStuck = true;
|
||||
} else { // Unstick it
|
||||
padcookie.setPref("chatAlwaysVisible", false);
|
||||
$('#chatbox').removeClass("stickyChat");
|
||||
$('#chattext').css({"top":"25px"});
|
||||
$('#titlesticky').show();
|
||||
$('#editorcontainer').css({"right":"0px"});
|
||||
isStuck = false;
|
||||
isStuck = false;
|
||||
}
|
||||
},
|
||||
hide: function ()
|
||||
|
|
|
@ -390,7 +390,7 @@
|
|||
|
||||
<div id="chatbox">
|
||||
<div id="titlebar"><span id ="titlelabel" data-l10n-id="pad.chat"></span>
|
||||
<a id="titlecross" onClick="chat.hide();return false;">- </a>
|
||||
<a id="titlecross" onClick="minimizeChatbox();">- </a>
|
||||
<a id="titlesticky" onClick="chat.stickToScreen(true);$('#options-stickychat').prop('checked', true);return false;" title="Stick chat to screen">█ </a>
|
||||
</div>
|
||||
<div id="chattext" class="authorColors">
|
||||
|
@ -476,6 +476,18 @@
|
|||
padeditbar = require('ep_etherpad-lite/static/js/pad_editbar').padeditbar;
|
||||
padimpexp = require('ep_etherpad-lite/static/js/pad_impexp').padimpexp;
|
||||
}());
|
||||
|
||||
function minimizeChatbox()
|
||||
{
|
||||
if ($('#options-stickychat').prop('checked')) {
|
||||
chat.stickToScreen();
|
||||
$('#options-stickychat').prop('checked', false);
|
||||
} else {
|
||||
chat.hide();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<% e.end_block(); %>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue