Changed to not use inline JavaScript
parent
d1367484e3
commit
17666eaef7
|
@ -54,11 +54,18 @@ var chat = (function()
|
|||
},
|
||||
hide: function ()
|
||||
{
|
||||
$("#chatcounter").text("0");
|
||||
$("#chaticon").show();
|
||||
$("#chatbox").hide();
|
||||
$.gritter.removeAll();
|
||||
$("#gritter-notice-wrapper").show();
|
||||
// decide on hide logic based on chat window being maximized or not
|
||||
if ($('#options-stickychat').prop('checked')) {
|
||||
chat.stickToScreen();
|
||||
$('#options-stickychat').prop('checked', false);
|
||||
}
|
||||
else {
|
||||
$("#chatcounter").text("0");
|
||||
$("#chaticon").show();
|
||||
$("#chatbox").hide();
|
||||
$.gritter.removeAll();
|
||||
$("#gritter-notice-wrapper").show();
|
||||
}
|
||||
},
|
||||
scrollDown: function()
|
||||
{
|
||||
|
|
|
@ -390,7 +390,7 @@
|
|||
|
||||
<div id="chatbox">
|
||||
<div id="titlebar"><span id ="titlelabel" data-l10n-id="pad.chat"></span>
|
||||
<a id="titlecross" onClick="minimizeChatbox();">- </a>
|
||||
<a id="titlecross" onClick="chat.hide();return false;">- </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,18 +476,6 @@
|
|||
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 New Issue