mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 08:26:16 -04:00
Merge remote-tracking branch 'upstream/master' into develop
This commit is contained in:
commit
a67aaa8f49
36 changed files with 2072 additions and 237 deletions
|
@ -1216,6 +1216,15 @@ function handleClientReady(client, message)
|
|||
"parts": plugins.parts,
|
||||
},
|
||||
"indentationOnNewLine": settings.indentationOnNewLine,
|
||||
"scrollWhenFocusLineIsOutOfViewport": {
|
||||
"percentage" : {
|
||||
"editionAboveViewport": settings.scrollWhenFocusLineIsOutOfViewport.percentage.editionAboveViewport,
|
||||
"editionBelowViewport": settings.scrollWhenFocusLineIsOutOfViewport.percentage.editionBelowViewport,
|
||||
},
|
||||
"duration": settings.scrollWhenFocusLineIsOutOfViewport.duration,
|
||||
"scrollWhenCaretIsInTheLastLineOfViewport": settings.scrollWhenFocusLineIsOutOfViewport.scrollWhenCaretIsInTheLastLineOfViewport,
|
||||
"percentageToScrollWhenUserPressesArrowUp": settings.scrollWhenFocusLineIsOutOfViewport.percentageToScrollWhenUserPressesArrowUp,
|
||||
},
|
||||
"initialChangesets": [] // FIXME: REMOVE THIS SHIT
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ var apiLogger = log4js.getLogger("API");
|
|||
var clientLogger = log4js.getLogger("client");
|
||||
var formidable = require('formidable');
|
||||
var apiHandler = require('../../handler/APIHandler');
|
||||
var isVarName = require('is-var-name');
|
||||
|
||||
//This is for making an api call, collecting all post information and passing it to the apiHandler
|
||||
var apiCaller = function(req, res, fields) {
|
||||
|
@ -18,7 +19,7 @@ var apiCaller = function(req, res, fields) {
|
|||
apiLogger.info("RESPONSE, " + req.params.func + ", " + response);
|
||||
|
||||
//is this a jsonp call, if yes, add the function call
|
||||
if(req.query.jsonp)
|
||||
if(req.query.jsonp && isVarName(response))
|
||||
response = req.query.jsonp + "(" + response + ")";
|
||||
|
||||
res._____send(response);
|
||||
|
|
|
@ -49,5 +49,8 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
//sigint is so far not working on windows
|
||||
//https://github.com/joyent/node/issues/1553
|
||||
process.on('SIGINT', exports.gracefulShutdown);
|
||||
// when running as PID1 (e.g. in docker container)
|
||||
// allow graceful shutdown on SIGTERM c.f. #3265
|
||||
process.on('SIGTERM', exports.gracefulShutdown);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -247,6 +247,33 @@ exports.users = {};
|
|||
*/
|
||||
exports.showSettingsInAdminPage = true;
|
||||
|
||||
/*
|
||||
* By default, when caret is moved out of viewport, it scrolls the minimum height needed to make this
|
||||
* line visible.
|
||||
*/
|
||||
exports.scrollWhenFocusLineIsOutOfViewport = {
|
||||
/*
|
||||
* Percentage of viewport height to be additionally scrolled.
|
||||
*/
|
||||
"percentage": {
|
||||
"editionAboveViewport": 0,
|
||||
"editionBelowViewport": 0
|
||||
},
|
||||
/*
|
||||
* Time (in milliseconds) used to animate the scroll transition. Set to 0 to disable animation
|
||||
*/
|
||||
"duration": 0,
|
||||
/*
|
||||
* Flag to control if it should scroll when user places the caret in the last line of the viewport
|
||||
*/
|
||||
/*
|
||||
* Percentage of viewport height to be additionally scrolled when user presses arrow up
|
||||
* in the line of the top of the viewport.
|
||||
*/
|
||||
"percentageToScrollWhenUserPressesArrowUp": 0,
|
||||
"scrollWhenCaretIsInTheLastLineOfViewport": false
|
||||
};
|
||||
|
||||
//checks if abiword is avaiable
|
||||
exports.abiwordAvailable = function()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue