Permalink
Browse files

Merge branch 'master' of github.com:Pita/etherpad-lite

  • Loading branch information...
2 parents d00be5b + fec8f8a commit bf42359669098be5012c19e00d6e22ea600d9f44 @Pita Pita committed Feb 27, 2012
Showing with 18 additions and 3 deletions.
  1. +1 −1 node/README.md
  2. +15 −1 static/js/pad.js
  3. +1 −0 static/js/pad_editor.js
  4. +1 −1 static/pad.html
View
@@ -6,7 +6,7 @@
# Module name conventions
-Module file names starts with a capital letter and uses camelCase
+Module file names start with a capital letter and uses camelCase
# Where does it start?
View
@@ -287,7 +287,7 @@ function handshake()
pad.changeViewOption('showLineNumbers', false);
}
- // If the noColors value is set to true then we need to hide the backround colors on the ace spans
+ // If the noColors value is set to true then we need to hide the background colors on the ace spans
if (settings.noColors == true)
{
pad.changeViewOption('noColors', true);
@@ -488,6 +488,9 @@ var pad = {
chat.stickToScreen(true); // stick it to the screen
$('#options-stickychat').prop("checked", true); // set the checkbox to on
}
+ if(padcookie.getPref("showAuthorshipColors") == false){
+ pad.changeViewOption('showAuthorColors', false);
+ }
}
},
dispose: function()
@@ -752,6 +755,7 @@ var pad = {
// pad.determineSidebarVisibility(isConnected && !isInitialConnect);
pad.determineChatVisibility(isConnected && !isInitialConnect);
+ pad.determineAuthorshipColorsVisibility();
},
/* determineSidebarVisibility: function(asNowConnectedFeedback)
@@ -781,6 +785,16 @@ var pad = {
$('#options-stickychat').prop("checked", false); // set the checkbox for off
}
},
+ determineAuthorshipColorsVisibility: function(){
+ var authColCookie = padcookie.getPref('showAuthorshipColors');
+ if (authColCookie){
+ pad.changeViewOption('showAuthorColors', true);
+ $('#options-colorscheck').prop("checked", true);
+ }
+ else {
+ $('#options-colorscheck').prop("checked", false);
+ }
+ },
handleCollabAction: function(action)
{
if (action == "commitPerformed")
@@ -69,6 +69,7 @@ var padeditor = (function()
});
padutils.bindCheckboxChange($("#options-colorscheck"), function()
{
+ padcookie.setPref('showAuthorshipColors', padutils.getCheckbox("#options-colorscheck"));
pad.changeViewOption('showAuthorColors', padutils.getCheckbox("#options-colorscheck"));
});
$("#viewfontmenu").change(function()
View
@@ -140,7 +140,7 @@
<label for="options-stickychat">Chat always on screen</label>
</p>
<p>
- <input type="checkbox" id="options-colorscheck" checked>
+ <input type="checkbox" id="options-colorscheck">
<label for="options-colorscheck">Authorship colors</label>
</p>
<p>

0 comments on commit bf42359

Please sign in to comment.