Merge branch 'master' of ../etherpad-lite.devmaster
This commit is contained in:
commit
e24b8ac93a
7 changed files with 72 additions and 5 deletions
|
@ -211,6 +211,7 @@ async.waterfall([
|
|||
return;
|
||||
}
|
||||
|
||||
res.header("Access-Control-Allow-Origin", "*");
|
||||
res.header("Server", serverName);
|
||||
exportHandler.doExport(req, res, req.params.pad, req.params.type);
|
||||
});
|
||||
|
|
|
@ -1086,3 +1086,11 @@ width:27px !important;
|
|||
opacity:0.01;
|
||||
display:none;
|
||||
}
|
||||
|
||||
#showhistorylabel{
|
||||
position:absolute;
|
||||
left:58px;
|
||||
top:4px;
|
||||
cursor: hand;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
|
@ -194,3 +194,29 @@ float:right;
|
|||
padding-right: 6pt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
ul { margin-left: 1.5em; }
|
||||
ul ul { margin-left: 0 !important; }
|
||||
ul.list-bullet1 { margin-left: 1.5em; }
|
||||
ul.list-bullet2 { margin-left: 3em; }
|
||||
ul.list-bullet3 { margin-left: 4.5em; }
|
||||
ul.list-bullet4 { margin-left: 6em; }
|
||||
ul.list-bullet5 { margin-left: 7.5em; }
|
||||
ul.list-bullet6 { margin-left: 9em; }
|
||||
ul.list-bullet7 { margin-left: 10.5em; }
|
||||
ul.list-bullet8 { margin-left: 12em; }
|
||||
|
||||
ul { list-style-type: disc; }
|
||||
ul.list-bullet1 { list-style-type: disc; }
|
||||
ul.list-bullet2 { list-style-type: circle; }
|
||||
ul.list-bullet3 { list-style-type: square; }
|
||||
ul.list-bullet4 { list-style-type: disc; }
|
||||
ul.list-bullet5 { list-style-type: circle; }
|
||||
ul.list-bullet6 { list-style-type: square; }
|
||||
ul.list-bullet7 { list-style-type: disc; }
|
||||
ul.list-bullet8 { list-style-type: circle; }
|
||||
|
||||
|
|
|
@ -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>'];
|
||||
|
|
|
@ -28,6 +28,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");
|
||||
|
@ -147,7 +160,7 @@ function handshake()
|
|||
token = randomString();
|
||||
createCookie("token", token, 60);
|
||||
}
|
||||
|
||||
|
||||
var msg = {
|
||||
"component": "pad",
|
||||
"type": "CLIENT_READY",
|
||||
|
@ -183,6 +196,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)
|
||||
{
|
||||
|
@ -403,7 +422,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(
|
||||
{
|
||||
|
|
|
@ -249,14 +249,17 @@ Use this link to share a read-only version of your pad:<input id="readonlyInput"
|
|||
<div id="chaticon">
|
||||
<a onClick="chat.show();return false;"
|
||||
title="Open the chat for this pad">
|
||||
<span id="chatlabel">Chat</span>
|
||||
<span id="chatlabel">Chat</span>
|
||||
<div class="buttonicon" style="background-position:0px -102px;display:inline-block;"></div>
|
||||
</a>
|
||||
<span id="chatcounter">0</span>
|
||||
</div>
|
||||
|
||||
<div id="chatbox">
|
||||
<div id="titlebar"><span id ="titlelabel">Chat</span><a id="titlecross" onClick="chat.hide();return false;">- </a></div>
|
||||
<div id="titlebar"><span id="titlelabel">Chat |</span>
|
||||
<a id="showhistorylabel" onClick="chat.showHistory();return false;">Show History</a>
|
||||
<a id="titlecross" onClick="chat.hide();return false;">- </a>
|
||||
</div>
|
||||
<div id="chattext" class="authorColors"></div>
|
||||
<div id="chatinputbox">
|
||||
<form>
|
||||
|
|
Loading…
Reference in a new issue