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

This commit is contained in:
Eric Martindale 2011-10-15 01:35:48 +00:00
commit 85d54ee5c3
5 changed files with 44 additions and 10 deletions

View file

@ -18,6 +18,7 @@
var socket;
var LineNumbersDisabled = false;
var noColors = false;
var useMonospaceFontGlobal = false;
var globalUserName = false;
@ -80,9 +81,18 @@ function getParams()
{
var showControls = getUrlVars()["showControls"];
var showChat = getUrlVars()["showChat"];
var userName = getUrlVars()["userName"];
var userName = unescape(getUrlVars()["userName"]);
var showLineNumbers = getUrlVars()["showLineNumbers"];
var useMonospaceFont = getUrlVars()["useMonospaceFont"];
var IsnoColors = getUrlVars()["noColors"];
if(IsnoColors)
{
if(IsnoColors == "true")
{
noColors = true;
}
}
if(showControls)
{
if(showControls == "false")
@ -236,6 +246,13 @@ 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 (noColors == true)
{
pad.changeViewOption('noColors', true);
}
// If the Monospacefont value is set to true then change it to monospace.
if (useMonospaceFontGlobal == true)
{
@ -245,6 +262,7 @@ function handshake()
if (globalUserName !== false)
{
pad.notifyChangeName(globalUserName); // Notifies the server
pad.myUserInfo.name = globalUserName;
$('#myusernameedit').attr({"value":globalUserName}); // Updates the current users UI
}
}

View file

@ -61,6 +61,8 @@ var padeditor = (function()
{
pad.changeViewOption('useMonospaceFont', $("#viewfontmenu").val() == 'monospace');
});
noColors = !noColors; // Inversed so we can pass it to showauthorcolors
},
setViewOptions: function(newOptions)
{
@ -84,6 +86,9 @@ var padeditor = (function()
v = getOption('useMonospaceFont', false);
self.ace.setProperty("textface", (v ? "monospace" : "Arial, sans-serif"));
$("#viewfontmenu").val(v ? "monospace" : "normal");
self.ace.setProperty("showsauthorcolors", noColors);
},
initViewZoom: function()
{