Allow authorship background colors to be disabled with a parameter
This commit is contained in:
parent
ecd486e440
commit
1bfd0e4707
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
var socket;
|
var socket;
|
||||||
var LineNumbersDisabled = false;
|
var LineNumbersDisabled = false;
|
||||||
|
var noColors = false;
|
||||||
var useMonospaceFontGlobal = false;
|
var useMonospaceFontGlobal = false;
|
||||||
var globalUserName = false;
|
var globalUserName = false;
|
||||||
|
|
||||||
|
@ -83,6 +84,15 @@ function getParams()
|
||||||
var userName = unescape(getUrlVars()["userName"]);
|
var userName = unescape(getUrlVars()["userName"]);
|
||||||
var showLineNumbers = getUrlVars()["showLineNumbers"];
|
var showLineNumbers = getUrlVars()["showLineNumbers"];
|
||||||
var useMonospaceFont = getUrlVars()["useMonospaceFont"];
|
var useMonospaceFont = getUrlVars()["useMonospaceFont"];
|
||||||
|
var IsnoColors = getUrlVars()["noColors"];
|
||||||
|
|
||||||
|
if(IsnoColors)
|
||||||
|
{
|
||||||
|
if(IsnoColors == "true")
|
||||||
|
{
|
||||||
|
noColors = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
if(showControls)
|
if(showControls)
|
||||||
{
|
{
|
||||||
if(showControls == "false")
|
if(showControls == "false")
|
||||||
|
@ -236,6 +246,13 @@ function handshake()
|
||||||
{
|
{
|
||||||
pad.changeViewOption('showLineNumbers', false);
|
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 (noColors == true)
|
||||||
|
{
|
||||||
|
pad.changeViewOption('noColors', true);
|
||||||
|
}
|
||||||
|
|
||||||
// If the Monospacefont value is set to true then change it to monospace.
|
// If the Monospacefont value is set to true then change it to monospace.
|
||||||
if (useMonospaceFontGlobal == true)
|
if (useMonospaceFontGlobal == true)
|
||||||
{
|
{
|
||||||
|
|
|
@ -61,6 +61,8 @@ var padeditor = (function()
|
||||||
{
|
{
|
||||||
pad.changeViewOption('useMonospaceFont', $("#viewfontmenu").val() == 'monospace');
|
pad.changeViewOption('useMonospaceFont', $("#viewfontmenu").val() == 'monospace');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
noColors = !noColors; // Inversed so we can pass it to showauthorcolors
|
||||||
},
|
},
|
||||||
setViewOptions: function(newOptions)
|
setViewOptions: function(newOptions)
|
||||||
{
|
{
|
||||||
|
@ -84,6 +86,9 @@ var padeditor = (function()
|
||||||
v = getOption('useMonospaceFont', false);
|
v = getOption('useMonospaceFont', false);
|
||||||
self.ace.setProperty("textface", (v ? "monospace" : "Arial, sans-serif"));
|
self.ace.setProperty("textface", (v ? "monospace" : "Arial, sans-serif"));
|
||||||
$("#viewfontmenu").val(v ? "monospace" : "normal");
|
$("#viewfontmenu").val(v ? "monospace" : "normal");
|
||||||
|
|
||||||
|
self.ace.setProperty("showsauthorcolors", noColors);
|
||||||
|
|
||||||
},
|
},
|
||||||
initViewZoom: function()
|
initViewZoom: function()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue