Added cookie to save option showing author colors

This commit is contained in:
Stefan 'Gared 2012-02-27 15:24:36 +00:00
parent d2cd1213ec
commit c54d47e1c6
3 changed files with 17 additions and 2 deletions

View file

@ -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")