fixed merge conflicts

This commit is contained in:
Peter 'Pita' Martischka 2011-08-15 16:58:22 +01:00
commit 255dc5a325
7 changed files with 71 additions and 4 deletions

View file

@ -18,6 +18,7 @@
var socket;
var LineNumbersDisabled = false;
var useMonospaceFontGlobal = false;
var globalUserName = false;
$(document).ready(function()
@ -77,6 +78,7 @@ function getParams()
var showChat = getUrlVars()["showChat"];
var userName = getUrlVars()["userName"];
var showLineNumbers = getUrlVars()["showLineNumbers"];
var useMonospaceFont = getUrlVars()["useMonospaceFont"];
if(showControls)
{
if(showControls == "false")
@ -102,6 +104,15 @@ function getParams()
}
}
if(useMonospaceFont)
{
if(useMonospaceFont == "true")
{
useMonospaceFontGlobal = true;
}
}
if(userName)
{
// If the username is set as a parameter we should set a global value that we can call once we have initiated the pad.
@ -139,6 +150,8 @@ function handshake()
socket.once('connect', function()
{
var padId = document.location.pathname.substring(document.location.pathname.lastIndexOf("/") + 1);
padId = unescape(padId); // unescape neccesary due to Safari and Opera interpretation of spaces
document.title = document.title + " | " + padId;
var token = readCookie("token");
@ -186,6 +199,12 @@ function handshake()
pad.changeViewOption('showLineNumbers', false);
}
// If the Monospacefont value is set to true then change it to monospace.
if (useMonospaceFontGlobal == true)
{
pad.changeViewOption('useMonospaceFont', true);
}
// if the globalUserName value is set we need to tell the server and the client about the new authorname
if (globalUserName !== false)
{
@ -406,7 +425,8 @@ var pad = {
};
options.view[key] = value;
pad.handleOptionsChange(options);
if (key != "showLineNumbers")
// if the request isn't to hide line numbers then broadcast this to other users
if (key != "showLineNumbers" && key != "useMonospaceFont")
{
pad.collabClient.sendClientMessage(
{