Merge with upstream develop.

This commit is contained in:
Mikk Andresen 2018-04-02 13:47:16 +03:00
commit 6f2466bebc
141 changed files with 4084 additions and 778 deletions

View file

@ -34,5 +34,10 @@ for ( var i = 0; i < argv.length; i++ ) {
exports.argv.settings = arg;
}
// Override location of credentials.json file
if ( prevArg == '--credentials' ) {
exports.argv.credentials = arg;
}
prevArg = arg;
}

View file

@ -23,9 +23,9 @@ var ERR = require("async-stacktrace");
var settings = require('./Settings');
var async = require('async');
var fs = require('fs');
var StringDecoder = require('string_decoder').StringDecoder;
var CleanCSS = require('clean-css');
var jsp = require("uglify-js").parser;
var pro = require("uglify-js").uglify;
var uglifyJS = require("uglify-js");
var path = require('path');
var plugins = require("ep_etherpad-lite/static/js/pluginfw/plugins");
var RequireKernel = require('etherpad-require-kernel');
@ -400,10 +400,10 @@ function getFile(filename, callback) {
function compressJS(content)
{
var ast = jsp.parse(content); // parse code and get the initial AST
ast = pro.ast_mangle(ast); // get a new AST with mangled names
ast = pro.ast_squeeze(ast); // get an AST with compression optimizations
return pro.gen_code(ast); // compressed code here
var decoder = new StringDecoder('utf8');
var code = decoder.write(content); // convert from buffer to string
var codeMinified = uglifyJS.minify(code, {fromString: true}).code;
return codeMinified;
}
function compressCSS(filename, content, callback)

View file

@ -100,7 +100,35 @@ exports.padOptions = {
"alwaysShowChat": false,
"chatAndUsers": false,
"lang": "en-gb"
}
},
/**
* Whether certain shortcut keys are enabled for a user in the pad
*/
exports.padShortcutEnabled = {
"altF9" : true,
"altC" : true,
"delete" : true,
"cmdShift2" : true,
"return" : true,
"esc" : true,
"cmdS" : true,
"tab" : true,
"cmdZ" : true,
"cmdY" : true,
"cmdB" : true,
"cmdI" : true,
"cmdU" : true,
"cmd5" : true,
"cmdShiftL" : true,
"cmdShiftN" : true,
"cmdShift1" : true,
"cmdShiftC" : true,
"cmdH" : true,
"ctrlHome" : true,
"pageUp" : true,
"pageDown" : true,
},
/**
* The toolbar buttons and order.
@ -177,6 +205,11 @@ exports.loglevel = "INFO";
*/
exports.disableIPlogging = false;
/**
* Number of seconds to automatically reconnect pad
*/
exports.automaticReconnectionTimeout = 0;
/**
* Disable Load Testing
*/
@ -214,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()
{