mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
set prefs and get prefs
This commit is contained in:
parent
444bbf4cbc
commit
a151c207c2
1 changed files with 10 additions and 2 deletions
|
@ -525,6 +525,15 @@ var pad = {
|
||||||
if(padcookie.getPref("showAuthorshipColors") == false){
|
if(padcookie.getPref("showAuthorshipColors") == false){
|
||||||
pad.changeViewOption('showAuthorColors', false);
|
pad.changeViewOption('showAuthorColors', false);
|
||||||
}
|
}
|
||||||
|
if(padcookie.getPref("showLineNumbers") == false){
|
||||||
|
pad.changeViewOption('showLineNumbers', false);
|
||||||
|
}
|
||||||
|
if(padcookie.getPref("rtlIsTrue") == true){
|
||||||
|
pad.changeViewOption('rtlIsTrue', true);
|
||||||
|
}
|
||||||
|
if(padcookie.getPref("useMonospaceFont") == true){
|
||||||
|
pad.changeViewOption('useMonospaceFont', true);
|
||||||
|
}
|
||||||
hooks.aCallAll("postAceInit", {ace: padeditor.ace, pad: pad});
|
hooks.aCallAll("postAceInit", {ace: padeditor.ace, pad: pad});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -575,6 +584,7 @@ var pad = {
|
||||||
for (var k in opts.view)
|
for (var k in opts.view)
|
||||||
{
|
{
|
||||||
pad.padOptions.view[k] = opts.view[k];
|
pad.padOptions.view[k] = opts.view[k];
|
||||||
|
padcookie.setPref(k, opts.view[k]);
|
||||||
}
|
}
|
||||||
padeditor.setViewOptions(pad.padOptions.view);
|
padeditor.setViewOptions(pad.padOptions.view);
|
||||||
}
|
}
|
||||||
|
@ -728,10 +738,8 @@ var pad = {
|
||||||
},
|
},
|
||||||
handleIsFullyConnected: function(isConnected, isInitialConnect)
|
handleIsFullyConnected: function(isConnected, isInitialConnect)
|
||||||
{
|
{
|
||||||
|
|
||||||
pad.determineChatVisibility(isConnected && !isInitialConnect);
|
pad.determineChatVisibility(isConnected && !isInitialConnect);
|
||||||
pad.determineAuthorshipColorsVisibility();
|
pad.determineAuthorshipColorsVisibility();
|
||||||
|
|
||||||
},
|
},
|
||||||
determineChatVisibility: function(asNowConnectedFeedback){
|
determineChatVisibility: function(asNowConnectedFeedback){
|
||||||
var chatVisCookie = padcookie.getPref('chatAlwaysVisible');
|
var chatVisCookie = padcookie.getPref('chatAlwaysVisible');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue