mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 17:06:16 -04:00
merged develop back in
This commit is contained in:
commit
6408581adb
19 changed files with 255 additions and 47 deletions
|
@ -14,6 +14,7 @@
|
|||
{ "name": "errorhandling", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/errorhandling:expressCreateServer" } },
|
||||
{ "name": "socketio", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/socketio:expressCreateServer" } },
|
||||
{ "name": "tests", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/tests:expressCreateServer" } },
|
||||
{ "name": "admin", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/admin:expressCreateServer" } },
|
||||
{ "name": "adminplugins", "hooks": {
|
||||
"expressCreateServer": "ep_etherpad-lite/node/hooks/express/adminplugins:expressCreateServer",
|
||||
"socketio": "ep_etherpad-lite/node/hooks/express/adminplugins:socketio" } }
|
||||
|
|
|
@ -30,6 +30,7 @@ exports.info = {
|
|||
block_stack: [],
|
||||
blocks: {},
|
||||
file_stack: [],
|
||||
args: []
|
||||
};
|
||||
|
||||
exports._init = function (b, recursive) {
|
||||
|
@ -81,7 +82,8 @@ exports.end_define_block = function () {
|
|||
|
||||
exports.end_block = function () {
|
||||
var name = exports.info.block_stack[exports.info.block_stack.length-1];
|
||||
var args = {content: exports.end_define_block()};
|
||||
var renderContext = exports.info.args[exports.info.args.length-1];
|
||||
var args = {content: exports.end_define_block(), renderContext: renderContext};
|
||||
hooks.callAll("eejsBlock_" + name, args);
|
||||
exports.info.buf.push(args.content);
|
||||
}
|
||||
|
@ -118,10 +120,13 @@ exports.require = function (name, args, mod) {
|
|||
args.e = exports;
|
||||
args.require = require;
|
||||
var template = '<% e._init(buf); %>' + fs.readFileSync(ejspath).toString() + '<% e._exit(); %>';
|
||||
|
||||
|
||||
exports.info.args.push(args);
|
||||
exports.info.file_stack.push({path: ejspath, inherit: []});
|
||||
|
||||
var res = ejs.render(template, args);
|
||||
exports.info.file_stack.pop();
|
||||
exports.info.args.pop();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
5
src/node/hooks/express/admin.js
Normal file
5
src/node/hooks/express/admin.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
exports.expressCreateServer = function (hook_name, args, cb) {
|
||||
args.app.get('/admin', function(req, res) {
|
||||
res.send( 501, 'Not Implemented, yet. Meanwhile go to <a href="/admin/plugins">/admin/plugins</a>' );
|
||||
});
|
||||
};
|
|
@ -12,8 +12,16 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
//serve robots.txt
|
||||
args.app.get('/robots.txt', function(req, res)
|
||||
{
|
||||
var filePath = path.normalize(__dirname + "/../../../static/robots.txt");
|
||||
res.sendfile(filePath);
|
||||
var filePath = path.normalize(__dirname + "/../../../static/custom/robots.txt");
|
||||
res.sendfile(filePath, function(err)
|
||||
{
|
||||
//there is no custom favicon, send the default robots.txt which dissallows all
|
||||
if(err)
|
||||
{
|
||||
filePath = path.normalize(__dirname + "/../../../static/robots.txt");
|
||||
res.sendfile(filePath);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//serve favicon.ico
|
||||
|
@ -34,13 +42,13 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
//serve pad.html under /p
|
||||
args.app.get('/p/:pad', function(req, res, next)
|
||||
{
|
||||
res.send(eejs.require("ep_etherpad-lite/templates/pad.html"));
|
||||
res.send(eejs.require("ep_etherpad-lite/templates/pad.html", {req: req}));
|
||||
});
|
||||
|
||||
//serve timeslider.html under /p/$padname/timeslider
|
||||
args.app.get('/p/:pad/timeslider', function(req, res, next)
|
||||
{
|
||||
res.send(eejs.require("ep_etherpad-lite/templates/timeslider.html"));
|
||||
res.send(eejs.require("ep_etherpad-lite/templates/timeslider.html", {req: req}));
|
||||
});
|
||||
|
||||
}
|
|
@ -29,6 +29,11 @@ var vm = require('vm');
|
|||
/* Root path of the installation */
|
||||
exports.root = path.normalize(path.join(npm.dir, ".."));
|
||||
|
||||
/**
|
||||
* The app title, visible e.g. in the browser window
|
||||
*/
|
||||
exports.title = "Etherpad Lite";
|
||||
|
||||
/**
|
||||
* The IP ep-lite should listen to
|
||||
*/
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
cursor: pointer;
|
||||
height: 35px;
|
||||
margin-left: 5px;
|
||||
margin-right: 148px;
|
||||
margin-right: 150px;
|
||||
position: relative;
|
||||
top: 20px;
|
||||
}
|
||||
|
@ -292,4 +292,4 @@ OL {
|
|||
}
|
||||
* HTML .pause#playpause_button_icon {
|
||||
background-image: url(../../static/img/pause.gif)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -516,7 +516,7 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
|
|||
{
|
||||
var type;
|
||||
var rr = cls && /(?:^| )list-([a-z]+[12345678])\b/.exec(cls);
|
||||
type = rr && rr[1] || "bullet" + String(Math.min(_MAX_LIST_LEVEL, (state.listNesting || 0) + 1));
|
||||
type = rr && rr[1] || (tname == "ul" ? "bullet" : "number") + String(Math.min(_MAX_LIST_LEVEL, (state.listNesting || 0) + 1));
|
||||
oldListTypeOrNull = (_enterList(state, type) || 'none');
|
||||
}
|
||||
else if ((tname == "div" || tname == "p") && cls && cls.match(/(?:^| )ace-line\b/))
|
||||
|
|
|
@ -158,6 +158,7 @@ function handleClientVars(message)
|
|||
{
|
||||
fireWhenAllScriptsAreLoaded[i]();
|
||||
}
|
||||
$("#ui-slider-handle").css('left', $("#ui-slider-bar").width() - 2);
|
||||
}
|
||||
|
||||
exports.baseURL = '';
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
<%
|
||||
var settings = require("ep_etherpad-lite/node/utils/Settings");
|
||||
%>
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<title>Etherpad Lite</title>
|
||||
<title><%=settings.title%></title>
|
||||
<script>
|
||||
/*
|
||||
|@licstart The following is the entire license notice for the
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
%>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<title>Etherpad Lite</title>
|
||||
<title><%=settings.title%></title>
|
||||
<script>
|
||||
/*
|
||||
|@licstart The following is the entire license notice for the
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<%
|
||||
var settings = require("ep_etherpad-lite/node/utils/Settings");
|
||||
%>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<title>Etherpad Lite Timeslider</title>
|
||||
<title><%=settings.title%> Timeslider</title>
|
||||
<script>
|
||||
/*
|
||||
|@licstart The following is the entire license notice for the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue