diff options
author | John McLear <john@mclear.co.uk> | 2015-01-24 02:20:34 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2015-01-24 02:20:34 +0000 |
commit | 4fa47ea969c0fbcef45d450b41613c4f3a263dac (patch) | |
tree | 53ca1faf2d184d34396ea08d0a8bbfd1283b19ac /src/static/js/pad.js | |
parent | c878a957b7c9696aa228e0bc14fbc1e6cd907b38 (diff) | |
parent | 7493cd994e9d2095a5baab06a8ea751e67805a8c (diff) | |
download | etherpad-lite-4fa47ea969c0fbcef45d450b41613c4f3a263dac.zip |
Merge branch 'develop' of github.com:ether/etherpad-lite into develop
Diffstat (limited to 'src/static/js/pad.js')
-rw-r--r-- | src/static/js/pad.js | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/static/js/pad.js b/src/static/js/pad.js index ff62f86c..77bfab7f 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -120,6 +120,7 @@ var getParameters = [ { name: "userColor", checkVal: null, callback: function(val) { settings.globalUserColor = decodeURIComponent(val); } }, { name: "rtl", checkVal: "true", callback: function(val) { settings.rtlIsTrue = true } }, { name: "alwaysShowChat", checkVal: "true", callback: function(val) { chat.stickToScreen(); } }, + { name: "chatAndUsers", checkVal: "true", callback: function(val) { chat.chatAndUsers(); } }, { name: "lang", checkVal: null, callback: function(val) { window.html10n.localize([val, 'en']); } } ]; @@ -494,7 +495,7 @@ var pad = { pad.initTime = +(new Date()); pad.padOptions = clientVars.initialOptions; - if ((!browser.msie) && (!(browser.mozilla && browser.version.indexOf("1.8.") == 0))) + if ((!browser.msie) && (!(browser.firefox && browser.version.indexOf("1.8.") == 0))) { document.domain = document.domain; // for comet } @@ -562,6 +563,10 @@ var pad = { chat.stickToScreen(true); // stick it to the screen $('#options-stickychat').prop("checked", true); // set the checkbox to on } + if(padcookie.getPref("chatAndUsers")){ // if we have a cookie for always showing chat then show it + chat.chatAndUsers(true); // stick it to the screen + $('#options-chatandusers').prop("checked", true); // set the checkbox to on + } if(padcookie.getPref("showAuthorshipColors") == false){ pad.changeViewOption('showAuthorColors', false); } @@ -779,6 +784,7 @@ var pad = { handleIsFullyConnected: function(isConnected, isInitialConnect) { pad.determineChatVisibility(isConnected && !isInitialConnect); + pad.determineChatAndUsersVisibility(isConnected && !isInitialConnect); pad.determineAuthorshipColorsVisibility(); }, determineChatVisibility: function(asNowConnectedFeedback){ @@ -791,6 +797,16 @@ var pad = { $('#options-stickychat').prop("checked", false); // set the checkbox for off } }, + determineChatAndUsersVisibility: function(asNowConnectedFeedback){ + var chatAUVisCookie = padcookie.getPref('chatAndUsersVisible'); + if(chatAUVisCookie){ // if the cookie is set for chat always visible + chat.chatAndUsers(true); // stick it to the screen + $('#options-chatandusers').prop("checked", true); // set the checkbox to on + } + else{ + $('#options-chatandusers').prop("checked", false); // set the checkbox for off + } + }, determineAuthorshipColorsVisibility: function(){ var authColCookie = padcookie.getPref('showAuthorshipColors'); if (authColCookie){ |