From 38d93eac39484bd598094838f5862bba4f5295b5 Mon Sep 17 00:00:00 2001
From: Stefan 'Gared
Date: Thu, 23 Feb 2012 15:59:20 +0100
Subject: [PATCH 1/2] fixed a spelling mistake
---
node/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/node/README.md b/node/README.md
index 031810f6..4b443289 100644
--- a/node/README.md
+++ b/node/README.md
@@ -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?
From c54d47e1c6d141a3059939ff57d42b2b3ff985a6 Mon Sep 17 00:00:00 2001
From: Stefan 'Gared
Date: Mon, 27 Feb 2012 15:24:36 +0000
Subject: [PATCH 2/2] Added cookie to save option showing author colors
---
static/js/pad.js | 16 +++++++++++++++-
static/js/pad_editor.js | 1 +
static/pad.html | 2 +-
3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/static/js/pad.js b/static/js/pad.js
index d6bb4c71..42605098 100644
--- a/static/js/pad.js
+++ b/static/js/pad.js
@@ -282,7 +282,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")
diff --git a/static/js/pad_editor.js b/static/js/pad_editor.js
index e838ae04..3dd67544 100644
--- a/static/js/pad_editor.js
+++ b/static/js/pad_editor.js
@@ -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()
diff --git a/static/pad.html b/static/pad.html
index ea0ad6f3..6f966550 100644
--- a/static/pad.html
+++ b/static/pad.html
@@ -140,7 +140,7 @@