mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-24 17:36:14 -04:00
fixed merge conflicts
This commit is contained in:
commit
255dc5a325
7 changed files with 71 additions and 4 deletions
|
@ -248,6 +248,8 @@ function Ace2Editor()
|
|||
|
||||
// these lines must conform to a specific format because they are passed by the build script:
|
||||
iframeHTML.push($$INCLUDE_CSS_Q("../static/css/iframe_editor.css"));
|
||||
iframeHTML.push($$INCLUDE_CSS_Q("../static/css/pad.css"));
|
||||
iframeHTML.push($$INCLUDE_CSS_Q("../static/custom/pad.css"));
|
||||
iframeHTML.push($$INCLUDE_JS_Q("../static/js/ace2_common.js"));
|
||||
iframeHTML.push($$INCLUDE_JS_Q("../static/js/skiplist.js"));
|
||||
iframeHTML.push($$INCLUDE_JS_Q("../static/js/virtual_lines.js"));
|
||||
|
@ -267,7 +269,7 @@ function Ace2Editor()
|
|||
var outerScript = 'editorId = "' + info.id + '"; editorInfo = parent.' + thisFunctionsName + '.registry[editorId]; ' + 'window.onload = function() ' + '{ window.onload = null; setTimeout' + '(function() ' + '{ var iframe = document.createElement("IFRAME"); ' + 'iframe.scrolling = "no"; var outerdocbody = document.getElementById("outerdocbody"); ' + 'iframe.frameBorder = 0; iframe.allowTransparency = true; ' + // for IE
|
||||
'outerdocbody.insertBefore(iframe, outerdocbody.firstChild); ' + 'iframe.ace_outerWin = window; ' + 'readyFunc = function() { editorInfo.onEditorReady(); readyFunc = null; editorInfo = null; }; ' + 'var doc = iframe.contentWindow.document; doc.open(); var text = (' + iframeHTML.join('+') + ').replace(/\\\\x3c/g, \'<\');doc.write(text); doc.close(); ' + '}, 0); }';
|
||||
|
||||
var outerHTML = [doctype, '<html><head>', $$INCLUDE_CSS("../static/css/iframe_editor.css"),
|
||||
var outerHTML = [doctype, '<html><head>', $$INCLUDE_CSS("../static/css/iframe_editor.css"), $$INCLUDE_CSS("../static/css/pad.css"), $$INCLUDE_CSS("../static/custom/pad.css"),
|
||||
// bizarrely, in FF2, a file with no "external" dependencies won't finish loading properly
|
||||
// (throbs busy while typing)
|
||||
'<link rel="stylesheet" type="text/css" href="data:text/css,"/>', '\x3cscript>\n', outerScript, '\n\x3c/script>', '</head><body id="outerdocbody"><div id="sidediv"><!-- --></div><div id="linemetricsdiv">x</div><div id="overlaysdiv"><!-- --></div></body></html>'];
|
||||
|
|
|
@ -44,6 +44,13 @@ var chat = (function()
|
|||
});
|
||||
});
|
||||
},
|
||||
showHistory: function()
|
||||
{
|
||||
// this is a placeholder for the showHistory function
|
||||
// load the messages from the server
|
||||
// append them to the UI using addMessage
|
||||
self.scrollDown(); // scroll down to the bottom of the chat
|
||||
},
|
||||
hide: function ()
|
||||
{
|
||||
$("#chatcounter").text("0");
|
||||
|
|
|
@ -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(
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue