mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-20 22:49: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
|
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"});
|
||||||
isStuck = true;
|
isStuck = true;
|
||||||
} else { // Unstick it
|
} else { // Unstick it
|
||||||
padcookie.setPref("chatAlwaysVisible", false);
|
padcookie.setPref("chatAlwaysVisible", false);
|
||||||
$('#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 ()
|
||||||
|
|
|
@ -390,7 +390,7 @@
|
||||||
|
|
||||||
<div id="chatbox">
|
<div id="chatbox">
|
||||||
<div id="titlebar"><span id ="titlelabel" data-l10n-id="pad.chat"></span>
|
<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>
|
<a id="titlesticky" onClick="chat.stickToScreen(true);$('#options-stickychat').prop('checked', true);return false;" title="Stick chat to screen">█ </a>
|
||||||
</div>
|
</div>
|
||||||
<div id="chattext" class="authorColors">
|
<div id="chattext" class="authorColors">
|
||||||
|
@ -476,6 +476,18 @@
|
||||||
padeditbar = require('ep_etherpad-lite/static/js/pad_editbar').padeditbar;
|
padeditbar = require('ep_etherpad-lite/static/js/pad_editbar').padeditbar;
|
||||||
padimpexp = require('ep_etherpad-lite/static/js/pad_impexp').padimpexp;
|
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>
|
</script>
|
||||||
<% e.end_block(); %>
|
<% e.end_block(); %>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue