From 383a216a7d41b8764da590183d5a58b65624b896 Mon Sep 17 00:00:00 2001 From: Grant Woodford Date: Thu, 28 Nov 2013 21:48:08 +0200 Subject: [PATCH] Added a way to closed the extended chat window --- src/static/js/chat.js | 6 +++--- src/templates/pad.html | 14 +++++++++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/static/js/chat.js b/src/static/js/chat.js index ed9b258f0..2ae72fe37 100644 --- a/src/static/js/chat.js +++ b/src/static/js/chat.js @@ -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 () diff --git a/src/templates/pad.html b/src/templates/pad.html index f6adfe9ce..eaa949dec 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -390,7 +390,7 @@
@@ -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; + } <% e.end_block(); %>