mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-28 19:29:15 -04:00
merge latest develop
This commit is contained in:
commit
4234681efd
12 changed files with 80 additions and 42 deletions
|
@ -687,12 +687,21 @@ Example returns:
|
|||
exports.createPad = function(padID, text, callback)
|
||||
{
|
||||
//ensure there is no $ in the padID
|
||||
if(padID && padID.indexOf("$") != -1)
|
||||
if(padID)
|
||||
{
|
||||
callback(new customError("createPad can't create group pads","apierror"));
|
||||
return;
|
||||
if(padID.indexOf("$") != -1)
|
||||
{
|
||||
callback(new customError("createPad can't create group pads","apierror"));
|
||||
return;
|
||||
}
|
||||
//check for url special characters
|
||||
else if(padID.match(/(\/|\?|&|#)/))
|
||||
{
|
||||
callback(new customError("malformed padID: Remove special characters","apierror"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//create pad
|
||||
getPadSafe(padID, false, text, function(err)
|
||||
{
|
||||
|
|
|
@ -26,7 +26,7 @@ var hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks.js");
|
|||
var resolve = require("resolve");
|
||||
|
||||
exports.info = {
|
||||
buf_stack: [],
|
||||
__output_stack: [],
|
||||
block_stack: [],
|
||||
file_stack: [],
|
||||
args: []
|
||||
|
@ -41,27 +41,27 @@ function createBlockId(name) {
|
|||
}
|
||||
|
||||
exports._init = function (b, recursive) {
|
||||
exports.info.buf_stack.push(exports.info.buf);
|
||||
exports.info.buf = b;
|
||||
exports.info.__output_stack.push(exports.info.__output);
|
||||
exports.info.__output = b;
|
||||
}
|
||||
|
||||
exports._exit = function (b, recursive) {
|
||||
getCurrentFile().inherit.forEach(function (item) {
|
||||
exports._require(item.name, item.args);
|
||||
});
|
||||
exports.info.buf = exports.info.buf_stack.pop();
|
||||
exports.info.__output = exports.info.__output_stack.pop();
|
||||
}
|
||||
|
||||
exports.begin_capture = function() {
|
||||
exports.info.buf_stack.push(exports.info.buf.concat());
|
||||
exports.info.buf.splice(0, exports.info.buf.length);
|
||||
exports.info.__output_stack.push(exports.info.__output.concat());
|
||||
exports.info.__output.splice(0, exports.info.__output.length);
|
||||
}
|
||||
|
||||
exports.end_capture = function () {
|
||||
var res = exports.info.buf.join("");
|
||||
exports.info.buf.splice.apply(
|
||||
exports.info.buf,
|
||||
[0, exports.info.buf.length].concat(exports.info.buf_stack.pop()));
|
||||
var res = exports.info.__output.join("");
|
||||
exports.info.__output.splice.apply(
|
||||
exports.info.__output,
|
||||
[0, exports.info.__output.length].concat(exports.info.__output_stack.pop()));
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ exports.end_block = function () {
|
|||
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);
|
||||
exports.info.__output.push(args.content);
|
||||
}
|
||||
|
||||
exports.begin_block = exports.begin_define_block;
|
||||
|
@ -114,7 +114,7 @@ exports.require = function (name, args, mod) {
|
|||
|
||||
args.e = exports;
|
||||
args.require = require;
|
||||
var template = '<% e._init(buf); %>' + fs.readFileSync(ejspath).toString() + '<% e._exit(); %>';
|
||||
var template = '<% e._init(__output); %>' + fs.readFileSync(ejspath).toString() + '<% e._exit(); %>';
|
||||
|
||||
exports.info.args.push(args);
|
||||
exports.info.file_stack.push({path: ejspath, inherit: []});
|
||||
|
@ -127,5 +127,5 @@ exports.require = function (name, args, mod) {
|
|||
}
|
||||
|
||||
exports._require = function (name, args) {
|
||||
exports.info.buf.push(exports.require(name, args));
|
||||
exports.info.__output.push(exports.require(name, args));
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
|
||||
// Cache both minified and static.
|
||||
var assetCache = new CachingMiddleware;
|
||||
args.app.all(/\/(javascripts|static)\/(.*)/, assetCache.handle);
|
||||
args.app.all(/\/javascripts\/(.*)/, assetCache.handle);
|
||||
|
||||
// Minify will serve static files compressed (minify enabled). It also has
|
||||
// file-specific hacks for ace/require-kernel/etc.
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
"etherpad-yajsml" : "0.0.2",
|
||||
"request" : "2.55.0",
|
||||
"requirejs" : "2.1.17",
|
||||
"etherpad-require-kernel" : "1.0.8",
|
||||
"etherpad-require-kernel" : "1.0.9",
|
||||
"resolve" : "1.1.6",
|
||||
"socket.io" : "1.3.5",
|
||||
"ueberDB" : "0.2.15",
|
||||
"express" : "4.12.3",
|
||||
"express-session" : "1.10.4",
|
||||
"express-session" : "1.11.1",
|
||||
"cookie-parser" : "1.3.4",
|
||||
"async" : "0.9.0",
|
||||
"clean-css" : "3.1.9",
|
||||
|
@ -29,21 +29,21 @@
|
|||
"log4js" : "0.6.22",
|
||||
"cheerio" : "0.19.0",
|
||||
"async-stacktrace" : "0.0.2",
|
||||
"npm" : "2.7.5",
|
||||
"ejs" : "1.0.0",
|
||||
"npm" : "2.7.6",
|
||||
"ejs" : "2.3.1",
|
||||
"graceful-fs" : "3.0.6",
|
||||
"slide" : "1.1.6",
|
||||
"semver" : "4.3.3",
|
||||
"security" : "1.0.0",
|
||||
"tinycon" : "0.0.1",
|
||||
"underscore" : "1.5.1",
|
||||
"underscore" : "1.8.3",
|
||||
"unorm" : "1.3.3",
|
||||
"languages4translatewiki" : "0.1.3",
|
||||
"swagger-node-express" : "2.1.3",
|
||||
"channels" : "0.0.4",
|
||||
"jsonminify" : "0.2.3",
|
||||
"measured" : "1.0.0",
|
||||
"mocha" : "2.2.1",
|
||||
"mocha" : "2.2.4",
|
||||
"supertest" : "0.15.0"
|
||||
},
|
||||
"bin": { "etherpad-lite": "./node/server.js" },
|
||||
|
@ -56,5 +56,5 @@
|
|||
"repository" : { "type" : "git",
|
||||
"url" : "http://github.com/ether/etherpad-lite.git"
|
||||
},
|
||||
"version" : "1.5.3"
|
||||
"version" : "1.5.4"
|
||||
}
|
||||
|
|
|
@ -210,8 +210,9 @@ ol {
|
|||
list-style-type: decimal;
|
||||
}
|
||||
|
||||
/* Fixes #2223 and #1836 */
|
||||
ol > li {
|
||||
display:inline;
|
||||
display:block;
|
||||
}
|
||||
|
||||
/* Set the indentation */
|
||||
|
|
|
@ -4955,7 +4955,10 @@ function Ace2Inner(){
|
|||
|
||||
// Don't paste on middle click of links
|
||||
$(root).on("paste", function(e){
|
||||
if(e.target.a){
|
||||
// TODO: this breaks pasting strings into URLS when using
|
||||
// Control C and Control V -- the Event is never available
|
||||
// here.. :(
|
||||
if(e.target.a || e.target.localName === "a"){
|
||||
e.preventDefault();
|
||||
}
|
||||
})
|
||||
|
|
|
@ -166,6 +166,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
|
|||
padmodals.showModal("disconnected");
|
||||
}
|
||||
|
||||
// Throttle seems like overkill here... Not sure why we do it!
|
||||
var fixPadHeight = _.throttle(function(){
|
||||
var height = $('#timeslider-top').height();
|
||||
$('#editorcontainerbox').css({marginTop: height});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue