mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 17:06:16 -04:00
Merge branch 'master' into eejs
This commit is contained in:
commit
5f7f382a9e
34 changed files with 182 additions and 165 deletions
|
@ -57,7 +57,7 @@ Here is the **[FAQ](https://github.com/Pita/etherpad-lite/wiki/FAQ)**
|
||||||
**As root:**
|
**As root:**
|
||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
<li>Install the dependencies. We need gzip, git, curl, libssl develop libraries, python and gcc. <br><i>For Debian/Ubuntu</i> <code>apt-get install gzip git-core curl python libssl-dev build-essential</code><br>
|
<li>Install the dependencies. We need gzip, git, curl, libssl develop libraries, python and gcc. <br><i>For Debian/Ubuntu</i> <code>apt-get install gzip git-core curl python libssl-dev pkg-config build-essential</code><br>
|
||||||
<i>For Fedora/CentOS</i> <code>yum install gzip git-core curl python openssl-devel && yum groupinstall "Development Tools"</code>
|
<i>For Fedora/CentOS</i> <code>yum install gzip git-core curl python openssl-devel && yum groupinstall "Development Tools"</code>
|
||||||
</li><br>
|
</li><br>
|
||||||
<li>Install node.js
|
<li>Install node.js
|
||||||
|
@ -73,6 +73,7 @@ Here is the **[FAQ](https://github.com/Pita/etherpad-lite/wiki/FAQ)**
|
||||||
|
|
||||||
<ol start="3">
|
<ol start="3">
|
||||||
<li>Move to a folder where you want to install Etherpad Lite. Clone the git repository <code>git clone 'git://github.com/Pita/etherpad-lite.git'</code><br> </li>
|
<li>Move to a folder where you want to install Etherpad Lite. Clone the git repository <code>git clone 'git://github.com/Pita/etherpad-lite.git'</code><br> </li>
|
||||||
|
<li>Change into the directory containing the Etherpad Lite source code clone with <code>cd etherpad-lite</code><br> </li>
|
||||||
<li>Install the dependencies with <code>bin/installDeps.sh</code><br> </li>
|
<li>Install the dependencies with <code>bin/installDeps.sh</code><br> </li>
|
||||||
<li>Start it with <code>bin/run.sh</code><br> </li>
|
<li>Start it with <code>bin/run.sh</code><br> </li>
|
||||||
<li>Open your web browser and visit <a href="http://localhost:9001">http://localhost:9001</a>. You like it? Look at the 'Next Steps' section below</li>
|
<li>Open your web browser and visit <a href="http://localhost:9001">http://localhost:9001</a>. You like it? Look at the 'Next Steps' section below</li>
|
||||||
|
|
16
README.plugins
Normal file
16
README.plugins
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
So, a plugin is an npm package whose name starts with ep_ and that contains a file ep.json
|
||||||
|
require("ep_etherpad-lite/static/js/plugingfw/plugins").update() will use npm to list all installed modules and read their ep.json files. These will contain registrations for hooks which are loaded
|
||||||
|
A hook registration is a pairs of a hook name and a function reference (filename for require() plus function name)
|
||||||
|
require("ep_etherpad-lite/static/js/plugingfw/hooks").callAll("hook_name", {argname:value}) will call all hook functions registered for hook_name
|
||||||
|
That is the basis.
|
||||||
|
Ok, so that was a slight simplification: inside ep.json, hook registrations are grouped into groups called "parts". Parts from all plugins are ordered using a topological sort according to "pre" and "post" pointers to other plugins/parts (just like dependencies, but non-installed plugins are silently ignored).
|
||||||
|
This ordering is honored when you do callAll(hook_name) - hook functions for that hook_name are called in that order
|
||||||
|
Ordering between plugins is undefined, only parts are ordered.
|
||||||
|
|
||||||
|
A plugin usually has one part, but it van have multiple.
|
||||||
|
This is so that it can insert some hook registration before that of another plugin, and another one after.
|
||||||
|
This is important for e.g. registering URL-handlers for the express webserver, if you have some very generic and some very specific url-regexps
|
||||||
|
So, that's basically it... apart from client-side hooks
|
||||||
|
which works the same way, but uses a separate member of the part (part.client_hooks vs part.hooks), and where the hook function must obviously reside in a file require():able from the client...
|
||||||
|
One thing more: The main etherpad tree is actually a plugin itself, called ep_etherpad-lite, and it has it's own ep.json...
|
||||||
|
was that clear?
|
|
@ -3,7 +3,6 @@
|
||||||
{ "name": "static", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/static:expressCreateServer" } },
|
{ "name": "static", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/static:expressCreateServer" } },
|
||||||
{ "name": "specialpages", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/specialpages:expressCreateServer" } },
|
{ "name": "specialpages", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/specialpages:expressCreateServer" } },
|
||||||
{ "name": "padurlsanitize", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/padurlsanitize:expressCreateServer" } },
|
{ "name": "padurlsanitize", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/padurlsanitize:expressCreateServer" } },
|
||||||
{ "name": "minified", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/minified:expressCreateServer" } },
|
|
||||||
{ "name": "padreadonly", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/padreadonly:expressCreateServer" } },
|
{ "name": "padreadonly", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/padreadonly:expressCreateServer" } },
|
||||||
{ "name": "webaccess", "hooks": { "expressConfigure": "ep_etherpad-lite/node/hooks/express/webaccess:expressConfigure" } },
|
{ "name": "webaccess", "hooks": { "expressConfigure": "ep_etherpad-lite/node/hooks/express/webaccess:expressConfigure" } },
|
||||||
{ "name": "apicalls", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/apicalls:expressCreateServer" } },
|
{ "name": "apicalls", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/apicalls:expressCreateServer" } },
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
var minify = require('../../utils/Minify');
|
|
||||||
|
|
||||||
exports.expressCreateServer = function (hook_name, args, cb) {
|
|
||||||
//serve minified files
|
|
||||||
args.app.get(/^\/minified\/(.*)/, minify.minifyJS);
|
|
||||||
}
|
|
|
@ -8,34 +8,9 @@ var fs = require("fs");
|
||||||
var ERR = require("async-stacktrace");
|
var ERR = require("async-stacktrace");
|
||||||
|
|
||||||
exports.expressCreateServer = function (hook_name, args, cb) {
|
exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
/* Handle static files for plugins:
|
|
||||||
paths like "/static/plugins/ep_myplugin/js/test.js"
|
|
||||||
are rewritten into ROOT_PATH_OF_MYPLUGIN/static/js/test.js,
|
|
||||||
commonly ETHERPAD_ROOT/node_modules/ep_myplugin/static/js/test.js
|
|
||||||
*/
|
|
||||||
args.app.get(/^\/minified\/plugins\/([^\/]+)\/static\/(.*)/, function(req, res, next) {
|
|
||||||
var plugin_name = req.params[0];
|
|
||||||
var modulePath = req.url.split("?")[0].substr("/minified/plugins/".length);
|
|
||||||
var fullPath = require.resolve(modulePath);
|
|
||||||
|
|
||||||
if (plugins.plugins[plugin_name] == undefined) {
|
|
||||||
return next();
|
|
||||||
}
|
|
||||||
|
|
||||||
fs.readFile(fullPath, "utf8", function(err, data){
|
|
||||||
if(ERR(err)) return;
|
|
||||||
|
|
||||||
res.send("require.define('" + modulePath + "', function (require, exports, module) {" + data + "})");
|
|
||||||
})
|
|
||||||
|
|
||||||
//require.define("/plugins.js", function (require, exports, module) {
|
|
||||||
|
|
||||||
//res.sendfile(fullPath);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Cache both minified and static.
|
// Cache both minified and static.
|
||||||
var assetCache = new CachingMiddleware;
|
var assetCache = new CachingMiddleware;
|
||||||
args.app.all('/(minified|static)/*', assetCache.handle);
|
args.app.all('/(javascripts|static)/*', assetCache.handle);
|
||||||
|
|
||||||
// Minify will serve static files compressed (minify enabled). It also has
|
// Minify will serve static files compressed (minify enabled). It also has
|
||||||
// file-specific hacks for ace/require-kernel/etc.
|
// file-specific hacks for ace/require-kernel/etc.
|
||||||
|
@ -44,8 +19,10 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
// Setup middleware that will package JavaScript files served by minify for
|
// Setup middleware that will package JavaScript files served by minify for
|
||||||
// CommonJS loader on the client-side.
|
// CommonJS loader on the client-side.
|
||||||
var jsServer = new (Yajsml.Server)({
|
var jsServer = new (Yajsml.Server)({
|
||||||
rootPath: 'minified/'
|
rootPath: 'javascripts/src/'
|
||||||
, rootURI: 'http://localhost:' + settings.port + '/static/js/'
|
, rootURI: 'http://localhost:' + settings.port + '/static/js/'
|
||||||
|
, libraryPath: 'javascripts/lib/'
|
||||||
|
, libraryURI: 'http://localhost:' + settings.port + '/static/plugins/'
|
||||||
});
|
});
|
||||||
|
|
||||||
var StaticAssociator = Yajsml.associators.StaticAssociator;
|
var StaticAssociator = Yajsml.associators.StaticAssociator;
|
||||||
|
|
|
@ -27,6 +27,7 @@ var cleanCSS = require('clean-css');
|
||||||
var jsp = require("uglify-js").parser;
|
var jsp = require("uglify-js").parser;
|
||||||
var pro = require("uglify-js").uglify;
|
var pro = require("uglify-js").uglify;
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
|
var plugins = require("ep_etherpad-lite/static/js/pluginfw/plugins");
|
||||||
var RequireKernel = require('require-kernel');
|
var RequireKernel = require('require-kernel');
|
||||||
var server = require('../server');
|
var server = require('../server');
|
||||||
|
|
||||||
|
@ -35,11 +36,14 @@ var TAR_PATH = path.join(__dirname, 'tar.json');
|
||||||
var tar = JSON.parse(fs.readFileSync(TAR_PATH, 'utf8'));
|
var tar = JSON.parse(fs.readFileSync(TAR_PATH, 'utf8'));
|
||||||
|
|
||||||
// Rewrite tar to include modules with no extensions and proper rooted paths.
|
// Rewrite tar to include modules with no extensions and proper rooted paths.
|
||||||
|
var LIBRARY_PREFIX = 'ep_etherpad-lite/static/js';
|
||||||
exports.tar = {};
|
exports.tar = {};
|
||||||
for (var key in tar) {
|
for (var key in tar) {
|
||||||
exports.tar['/' + key] =
|
exports.tar[LIBRARY_PREFIX + '/' + key] =
|
||||||
tar[key].map(function (p) {return '/' + p}).concat(
|
tar[key].map(function (p) {return LIBRARY_PREFIX + '/' + p}).concat(
|
||||||
tar[key].map(function (p) {return '/' + p.replace(/\.js$/, '')})
|
tar[key].map(function (p) {
|
||||||
|
return LIBRARY_PREFIX + '/' + p.replace(/\.js$/, '')
|
||||||
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,6 +67,22 @@ exports.minify = function(req, res, next)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Handle static files for plugins:
|
||||||
|
paths like "plugins/ep_myplugin/static/js/test.js"
|
||||||
|
are rewritten into ROOT_PATH_OF_MYPLUGIN/static/js/test.js,
|
||||||
|
commonly ETHERPAD_ROOT/node_modules/ep_myplugin/static/js/test.js
|
||||||
|
*/
|
||||||
|
var match = filename.match(/^plugins\/([^\/]+)\/static\/(.*)/);
|
||||||
|
if (match) {
|
||||||
|
var pluginName = match[1];
|
||||||
|
var resourcePath = match[2];
|
||||||
|
var plugin = plugins.plugins[pluginName];
|
||||||
|
if (plugin) {
|
||||||
|
var pluginPath = plugin.package.realPath;
|
||||||
|
filename = path.relative(ROOT_DIR, pluginPath + '/static/' + resourcePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// What content type should this be?
|
// What content type should this be?
|
||||||
// TODO: This should use a MIME module.
|
// TODO: This should use a MIME module.
|
||||||
var contentType;
|
var contentType;
|
||||||
|
@ -149,8 +169,10 @@ function getAceFile(callback) {
|
||||||
var request = require('request');
|
var request = require('request');
|
||||||
|
|
||||||
var baseURI = 'http://localhost:' + settings.port
|
var baseURI = 'http://localhost:' + settings.port
|
||||||
|
var resourceURI = baseURI + path.normalize(path.join('/static/', filename));
|
||||||
|
resourceURI = resourceURI.replace(/\\/g, '/'); // Windows (safe generally?)
|
||||||
|
|
||||||
request(baseURI + path.normalize(path.join('/static/', filename)), function (error, response, body) {
|
request(resourceURI, function (error, response, body) {
|
||||||
if (!error && response.statusCode == 200) {
|
if (!error && response.statusCode == 200) {
|
||||||
data += 'Ace2Editor.EMBEDED[' + JSON.stringify(filename) + '] = '
|
data += 'Ace2Editor.EMBEDED[' + JSON.stringify(filename) + '] = '
|
||||||
+ JSON.stringify(body || '') + ';\n';
|
+ JSON.stringify(body || '') + ';\n';
|
||||||
|
|
|
@ -21,9 +21,10 @@ var path = require('path');
|
||||||
var server = require('../server');
|
var server = require('../server');
|
||||||
var zlib = require('zlib');
|
var zlib = require('zlib');
|
||||||
var util = require('util');
|
var util = require('util');
|
||||||
|
var settings = require('./Settings');
|
||||||
|
|
||||||
var ROOT_DIR = path.normalize(__dirname + "/../");
|
var CACHE_DIR = path.normalize(path.join(settings.root, 'var/'));
|
||||||
var CACHE_DIR = ROOT_DIR + '../var/';
|
CACHE_DIR = path.existsSync(CACHE_DIR) ? CACHE_DIR : undefined;
|
||||||
|
|
||||||
var responseCache = {};
|
var responseCache = {};
|
||||||
|
|
||||||
|
@ -37,7 +38,7 @@ function CachingMiddleware() {
|
||||||
}
|
}
|
||||||
CachingMiddleware.prototype = new function () {
|
CachingMiddleware.prototype = new function () {
|
||||||
function handle(req, res, next) {
|
function handle(req, res, next) {
|
||||||
if (!(req.method == "GET" || req.method == "HEAD")) {
|
if (!(req.method == "GET" || req.method == "HEAD") || !CACHE_DIR) {
|
||||||
return next(undefined, req, res);
|
return next(undefined, req, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +55,7 @@ CachingMiddleware.prototype = new function () {
|
||||||
var modifiedSince = (req.headers['if-modified-since']
|
var modifiedSince = (req.headers['if-modified-since']
|
||||||
&& new Date(req.headers['if-modified-since']));
|
&& new Date(req.headers['if-modified-since']));
|
||||||
var lastModifiedCache = !error && stats.mtime;
|
var lastModifiedCache = !error && stats.mtime;
|
||||||
if (lastModifiedCache) {
|
if (lastModifiedCache && responseCache[cacheKey]) {
|
||||||
req.headers['if-modified-since'] = lastModifiedCache.toUTCString();
|
req.headers['if-modified-since'] = lastModifiedCache.toUTCString();
|
||||||
} else {
|
} else {
|
||||||
delete req.headers['if-modified-since'];
|
delete req.headers['if-modified-since'];
|
||||||
|
@ -83,7 +84,7 @@ CachingMiddleware.prototype = new function () {
|
||||||
&& new Date(res.getHeader('last-modified')));
|
&& new Date(res.getHeader('last-modified')));
|
||||||
|
|
||||||
res.writeHead = old_res.writeHead;
|
res.writeHead = old_res.writeHead;
|
||||||
if (status == 200 || status == 404) {
|
if (status == 200) {
|
||||||
// Update cache
|
// Update cache
|
||||||
var buffer = '';
|
var buffer = '';
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
"yajsml" : "1.1.2",
|
"yajsml" : "1.1.2",
|
||||||
"request" : "2.9.100",
|
"request" : "2.9.100",
|
||||||
"require-kernel" : "1.0.3",
|
"require-kernel" : "1.0.5",
|
||||||
"socket.io" : "0.8.7",
|
"socket.io" : "0.8.7",
|
||||||
"ueberDB" : "0.1.7",
|
"ueberDB" : "0.1.7",
|
||||||
"async" : "0.1.18",
|
"async" : "0.1.18",
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var AttributePoolFactory = require("ep_etherpad-lite/static/js/AttributePoolFactory");
|
var AttributePoolFactory = require("./AttributePoolFactory");
|
||||||
|
|
||||||
var _opt = null;
|
var _opt = null;
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ Ace2Editor.registry = {
|
||||||
nextId: 1
|
nextId: 1
|
||||||
};
|
};
|
||||||
|
|
||||||
var hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
var hooks = require('./pluginfw/hooks');
|
||||||
|
|
||||||
function Ace2Editor()
|
function Ace2Editor()
|
||||||
{
|
{
|
||||||
|
@ -156,7 +156,11 @@ function Ace2Editor()
|
||||||
}
|
}
|
||||||
function pushRequireScriptTo(buffer) {
|
function pushRequireScriptTo(buffer) {
|
||||||
var KERNEL_SOURCE = '../static/js/require-kernel.js';
|
var KERNEL_SOURCE = '../static/js/require-kernel.js';
|
||||||
var KERNEL_BOOT = 'require.setRootURI("../minified/");\nrequire.setLibraryURI("../minified/plugins/");\nrequire.setGlobalKeyPath("require");'
|
var KERNEL_BOOT = '\
|
||||||
|
require.setRootURI("../javascripts/src");\n\
|
||||||
|
require.setLibraryURI("../javascripts/lib");\n\
|
||||||
|
require.setGlobalKeyPath("require");\n\
|
||||||
|
';
|
||||||
if (Ace2Editor.EMBEDED && Ace2Editor.EMBEDED[KERNEL_SOURCE]) {
|
if (Ace2Editor.EMBEDED && Ace2Editor.EMBEDED[KERNEL_SOURCE]) {
|
||||||
buffer.push('<script type="text/javascript">');
|
buffer.push('<script type="text/javascript">');
|
||||||
buffer.push(Ace2Editor.EMBEDED[KERNEL_SOURCE]);
|
buffer.push(Ace2Editor.EMBEDED[KERNEL_SOURCE]);
|
||||||
|
@ -166,8 +170,8 @@ function Ace2Editor()
|
||||||
}
|
}
|
||||||
function pushScriptsTo(buffer) {
|
function pushScriptsTo(buffer) {
|
||||||
/* Folling is for packaging regular expression. */
|
/* Folling is for packaging regular expression. */
|
||||||
/* $$INCLUDE_JS("../minified/ace2_inner.js?callback=require.define"); */
|
/* $$INCLUDE_JS("../javascripts/src/ace2_inner.js?callback=require.define"); */
|
||||||
var ACE_SOURCE = '../minified/ace2_inner.js?callback=require.define';
|
var ACE_SOURCE = '../javascripts/src/ace2_inner.js?callback=require.define';
|
||||||
if (Ace2Editor.EMBEDED && Ace2Editor.EMBEDED[ACE_SOURCE]) {
|
if (Ace2Editor.EMBEDED && Ace2Editor.EMBEDED[ACE_SOURCE]) {
|
||||||
buffer.push('<script type="text/javascript">');
|
buffer.push('<script type="text/javascript">');
|
||||||
buffer.push(Ace2Editor.EMBEDED[ACE_SOURCE]);
|
buffer.push(Ace2Editor.EMBEDED[ACE_SOURCE]);
|
||||||
|
@ -175,11 +179,6 @@ function Ace2Editor()
|
||||||
buffer.push('<\/script>');
|
buffer.push('<\/script>');
|
||||||
} else {
|
} else {
|
||||||
file = ACE_SOURCE;
|
file = ACE_SOURCE;
|
||||||
file = file.replace(/^\.\.\/static\/js\//, '../minified/');
|
|
||||||
buffer.push('<script type="text/javascript" src="../static/js/require-kernel.js"><\/script>');
|
|
||||||
buffer.push('<script type="text/javascript">');
|
|
||||||
buffer.push('require.setRootURI("../minified/"); require.setLibraryURI("../minified/plugins/"); require.setGlobalKeyPath("require");');
|
|
||||||
buffer.push('<\/script>');
|
|
||||||
buffer.push('<script type="application/javascript" src="' + ACE_SOURCE + '"><\/script>');
|
buffer.push('<script type="application/javascript" src="' + ACE_SOURCE + '"><\/script>');
|
||||||
buffer.push('<script type="text/javascript">');
|
buffer.push('<script type="text/javascript">');
|
||||||
buffer.push('require("ep_etherpad-lite/static/js/ace2_inner");');
|
buffer.push('require("ep_etherpad-lite/static/js/ace2_inner");');
|
||||||
|
@ -261,9 +260,7 @@ function Ace2Editor()
|
||||||
pushRequireScriptTo(iframeHTML);
|
pushRequireScriptTo(iframeHTML);
|
||||||
// Inject my plugins into my child.
|
// Inject my plugins into my child.
|
||||||
iframeHTML.push('\
|
iframeHTML.push('\
|
||||||
<script type="text/javascript" src="../static/js/require-kernel.js"></script>\
|
|
||||||
<script type="text/javascript">\
|
<script type="text/javascript">\
|
||||||
require.setRootURI("../minified/"); require.setLibraryURI("../minified/plugins/"); require.setGlobalKeyPath("require");\
|
|
||||||
require.define("/plugins", null);\n\
|
require.define("/plugins", null);\n\
|
||||||
require.define("/plugins.js", function (require, exports, module) {\
|
require.define("/plugins.js", function (require, exports, module) {\
|
||||||
module.exports = require("ep_etherpad-lite/static/js/plugins");\
|
module.exports = require("ep_etherpad-lite/static/js/plugins");\
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Security = require('ep_etherpad-lite/static/js/security');
|
var Security = require('./security');
|
||||||
|
|
||||||
function isNodeText(node)
|
function isNodeText(node)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Ace2Common = require('ep_etherpad-lite/static/js/ace2_common');
|
var Ace2Common = require('./ace2_common');
|
||||||
|
|
||||||
// Extract useful method defined in the other module.
|
// Extract useful method defined in the other module.
|
||||||
var isNodeText = Ace2Common.isNodeText;
|
var isNodeText = Ace2Common.isNodeText;
|
||||||
|
@ -38,18 +38,17 @@ var htmlPrettyEscape = Ace2Common.htmlPrettyEscape;
|
||||||
var map = Ace2Common.map;
|
var map = Ace2Common.map;
|
||||||
var noop = Ace2Common.noop;
|
var noop = Ace2Common.noop;
|
||||||
|
|
||||||
var makeChangesetTracker = require('ep_etherpad-lite/static/js/changesettracker').makeChangesetTracker;
|
var makeChangesetTracker = require('./changesettracker').makeChangesetTracker;
|
||||||
var colorutils = require('ep_etherpad-lite/static/js/colorutils').colorutils;
|
var colorutils = require('./colorutils').colorutils;
|
||||||
var makeContentCollector = require('ep_etherpad-lite/static/js/contentcollector').makeContentCollector;
|
var makeContentCollector = require('./contentcollector').makeContentCollector;
|
||||||
var makeCSSManager = require('ep_etherpad-lite/static/js/cssmanager').makeCSSManager;
|
var makeCSSManager = require('./cssmanager').makeCSSManager;
|
||||||
var domline = require('ep_etherpad-lite/static/js/domline').domline;
|
var domline = require('./domline').domline;
|
||||||
var AttribPool = require('ep_etherpad-lite/static/js/AttributePoolFactory').createAttributePool;
|
var AttribPool = require('./AttributePoolFactory').createAttributePool;
|
||||||
var Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
var Changeset = require('./Changeset');
|
||||||
var linestylefilter = require('ep_etherpad-lite/static/js/linestylefilter').linestylefilter;
|
var linestylefilter = require('./linestylefilter').linestylefilter;
|
||||||
var newSkipList = require('ep_etherpad-lite/static/js/skiplist').newSkipList;
|
var newSkipList = require('./skiplist').newSkipList;
|
||||||
var undoModule = require('ep_etherpad-lite/static/js/undomodule').undoModule;
|
var undoModule = require('./undomodule').undoModule;
|
||||||
var makeVirtualLineView = require('ep_etherpad-lite/static/js/virtual_lines').makeVirtualLineView;
|
var makeVirtualLineView = require('./virtual_lines').makeVirtualLineView;
|
||||||
|
|
||||||
|
|
||||||
function Ace2Inner(){
|
function Ace2Inner(){
|
||||||
var DEBUG = false; //$$ build script replaces the string "var DEBUG=true;//$$" with "var DEBUG=false;"
|
var DEBUG = false; //$$ build script replaces the string "var DEBUG=true;//$$" with "var DEBUG=false;"
|
||||||
|
|
|
@ -20,13 +20,13 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var makeCSSManager = require('ep_etherpad-lite/static/js/cssmanager').makeCSSManager;
|
var makeCSSManager = require('./cssmanager').makeCSSManager;
|
||||||
var domline = require('ep_etherpad-lite/static/js/domline').domline;
|
var domline = require('./domline').domline;
|
||||||
var AttribPool = require('ep_etherpad-lite/static/js/AttributePoolFactory').createAttributePool;
|
var AttribPool = require('./AttributePoolFactory').createAttributePool;
|
||||||
var Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
var Changeset = require('./Changeset');
|
||||||
var linestylefilter = require('ep_etherpad-lite/static/js/linestylefilter').linestylefilter;
|
var linestylefilter = require('./linestylefilter').linestylefilter;
|
||||||
var colorutils = require('ep_etherpad-lite/static/js/colorutils').colorutils;
|
var colorutils = require('./colorutils').colorutils;
|
||||||
var Ace2Common = require('ep_etherpad-lite/static/js/ace2_common');
|
var Ace2Common = require('./ace2_common');
|
||||||
|
|
||||||
var map = Ace2Common.map;
|
var map = Ace2Common.map;
|
||||||
var forEach = Ace2Common.forEach;
|
var forEach = Ace2Common.forEach;
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
|
|
||||||
// These parameters were global, now they are injected. A reference to the
|
// These parameters were global, now they are injected. A reference to the
|
||||||
// Timeslider controller would probably be more appropriate.
|
// Timeslider controller would probably be more appropriate.
|
||||||
|
var forEach = require('./ace2_common').forEach;
|
||||||
|
|
||||||
function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
|
function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
|
||||||
{
|
{
|
||||||
var BroadcastSlider;
|
var BroadcastSlider;
|
||||||
|
@ -173,7 +175,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
|
||||||
$("#authorstable").empty();
|
$("#authorstable").empty();
|
||||||
var numAnonymous = 0;
|
var numAnonymous = 0;
|
||||||
var numNamed = 0;
|
var numNamed = 0;
|
||||||
authors.forEach(function(author)
|
forEach(authors, function(author)
|
||||||
{
|
{
|
||||||
if (author.name)
|
if (author.name)
|
||||||
{
|
{
|
||||||
|
@ -467,7 +469,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
|
||||||
$("#timeslider").show();
|
$("#timeslider").show();
|
||||||
setSliderLength(clientVars.totalRevs);
|
setSliderLength(clientVars.totalRevs);
|
||||||
setSliderPosition(clientVars.revNum);
|
setSliderPosition(clientVars.revNum);
|
||||||
clientVars.savedRevisions.forEach(function(revision)
|
forEach(clientVars.savedRevisions, function(revision)
|
||||||
{
|
{
|
||||||
addSavedRevision(revision.revNum, revision);
|
addSavedRevision(revision.revNum, revision);
|
||||||
})
|
})
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var AttribPool = require('ep_etherpad-lite/static/js/AttributePoolFactory').createAttributePool;
|
var AttribPool = require('./AttributePoolFactory').createAttributePool;
|
||||||
var Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
var Changeset = require('./Changeset');
|
||||||
|
|
||||||
function makeChangesetTracker(scheduler, apool, aceCallbacksProvider)
|
function makeChangesetTracker(scheduler, apool, aceCallbacksProvider)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var padutils = require('ep_etherpad-lite/static/js/pad_utils').padutils;
|
var padutils = require('./pad_utils').padutils;
|
||||||
var padcookie = require('ep_etherpad-lite/static/js/pad_cookie').padcookie;
|
var padcookie = require('./pad_cookie').padcookie;
|
||||||
|
|
||||||
var chat = (function()
|
var chat = (function()
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var chat = require('ep_etherpad-lite/static/js/chat').chat;
|
var chat = require('./chat').chat;
|
||||||
|
|
||||||
// Dependency fill on init. This exists for `pad.socket` only.
|
// Dependency fill on init. This exists for `pad.socket` only.
|
||||||
// TODO: bind directly to the socket.
|
// TODO: bind directly to the socket.
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
|
|
||||||
var _MAX_LIST_LEVEL = 8;
|
var _MAX_LIST_LEVEL = 8;
|
||||||
|
|
||||||
var Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
var Changeset = require('./Changeset');
|
||||||
var hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
var hooks = require('./pluginfw/hooks');
|
||||||
|
|
||||||
function sanitizeUnicode(s)
|
function sanitizeUnicode(s)
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
// requires: plugins
|
// requires: plugins
|
||||||
// requires: undefined
|
// requires: undefined
|
||||||
|
|
||||||
var Security = require('ep_etherpad-lite/static/js/security');
|
var Security = require('./security');
|
||||||
var hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
var hooks = require('./pluginfw/hooks');
|
||||||
var Ace2Common = require('ep_etherpad-lite/static/js/ace2_common');
|
var Ace2Common = require('./ace2_common');
|
||||||
var map = Ace2Common.map;
|
var map = Ace2Common.map;
|
||||||
var noop = Ace2Common.noop;
|
var noop = Ace2Common.noop;
|
||||||
var identity = Ace2Common.identity;
|
var identity = Ace2Common.identity;
|
||||||
|
|
|
@ -28,9 +28,9 @@
|
||||||
// requires: plugins
|
// requires: plugins
|
||||||
// requires: undefined
|
// requires: undefined
|
||||||
|
|
||||||
var Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
var Changeset = require('./Changeset');
|
||||||
var hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
var hooks = require('./pluginfw/hooks');
|
||||||
var map = require('ep_etherpad-lite/static/js/ace2_common').map;
|
var map = require('./ace2_common').map;
|
||||||
|
|
||||||
var linestylefilter = {};
|
var linestylefilter = {};
|
||||||
|
|
||||||
|
|
|
@ -26,29 +26,29 @@ var socket;
|
||||||
|
|
||||||
// These jQuery things should create local references, but for now `require()`
|
// These jQuery things should create local references, but for now `require()`
|
||||||
// assigns to the global `$` and augments it with plugins.
|
// assigns to the global `$` and augments it with plugins.
|
||||||
require('ep_etherpad-lite/static/js/jquery');
|
require('./jquery');
|
||||||
require('ep_etherpad-lite/static/js/farbtastic');
|
require('./farbtastic');
|
||||||
require('ep_etherpad-lite/static/js/excanvas');
|
require('./excanvas');
|
||||||
JSON = require('ep_etherpad-lite/static/js/json2');
|
JSON = require('./json2');
|
||||||
require('ep_etherpad-lite/static/js/undo-xpopup');
|
require('./undo-xpopup');
|
||||||
require('ep_etherpad-lite/static/js/prefixfree');
|
require('./prefixfree');
|
||||||
|
|
||||||
var chat = require('ep_etherpad-lite/static/js/chat').chat;
|
var chat = require('./chat').chat;
|
||||||
var getCollabClient = require('ep_etherpad-lite/static/js/collab_client').getCollabClient;
|
var getCollabClient = require('./collab_client').getCollabClient;
|
||||||
var padconnectionstatus = require('ep_etherpad-lite/static/js/pad_connectionstatus').padconnectionstatus;
|
var padconnectionstatus = require('./pad_connectionstatus').padconnectionstatus;
|
||||||
var padcookie = require('ep_etherpad-lite/static/js/pad_cookie').padcookie;
|
var padcookie = require('./pad_cookie').padcookie;
|
||||||
var paddocbar = require('ep_etherpad-lite/static/js/pad_docbar').paddocbar;
|
var paddocbar = require('./pad_docbar').paddocbar;
|
||||||
var padeditbar = require('ep_etherpad-lite/static/js/pad_editbar').padeditbar;
|
var padeditbar = require('./pad_editbar').padeditbar;
|
||||||
var padeditor = require('ep_etherpad-lite/static/js/pad_editor').padeditor;
|
var padeditor = require('./pad_editor').padeditor;
|
||||||
var padimpexp = require('ep_etherpad-lite/static/js/pad_impexp').padimpexp;
|
var padimpexp = require('./pad_impexp').padimpexp;
|
||||||
var padmodals = require('ep_etherpad-lite/static/js/pad_modals').padmodals;
|
var padmodals = require('./pad_modals').padmodals;
|
||||||
var padsavedrevs = require('ep_etherpad-lite/static/js/pad_savedrevs').padsavedrevs;
|
var padsavedrevs = require('./pad_savedrevs').padsavedrevs;
|
||||||
var paduserlist = require('ep_etherpad-lite/static/js/pad_userlist').paduserlist;
|
var paduserlist = require('./pad_userlist').paduserlist;
|
||||||
var padutils = require('ep_etherpad-lite/static/js/pad_utils').padutils;
|
var padutils = require('./pad_utils').padutils;
|
||||||
|
|
||||||
var createCookie = require('ep_etherpad-lite/static/js/pad_utils').createCookie;
|
var createCookie = require('./pad_utils').createCookie;
|
||||||
var readCookie = require('ep_etherpad-lite/static/js/pad_utils').readCookie;
|
var readCookie = require('./pad_utils').readCookie;
|
||||||
var randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
|
var randomString = require('./pad_utils').randomString;
|
||||||
|
|
||||||
function getParams()
|
function getParams()
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var padmodals = require('ep_etherpad-lite/static/js/pad_modals').padmodals;
|
var padmodals = require('./pad_modals').padmodals;
|
||||||
|
|
||||||
var padconnectionstatus = (function()
|
var padconnectionstatus = (function()
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var padutils = require('ep_etherpad-lite/static/js/pad_utils').padutils;
|
var padutils = require('./pad_utils').padutils;
|
||||||
|
|
||||||
var paddocbar = (function()
|
var paddocbar = (function()
|
||||||
{
|
{
|
||||||
|
@ -449,7 +449,7 @@ var paddocbar = (function()
|
||||||
handleResizePage: function()
|
handleResizePage: function()
|
||||||
{
|
{
|
||||||
// Side-step circular reference. This should be injected.
|
// Side-step circular reference. This should be injected.
|
||||||
var padsavedrevs = require('ep_etherpad-lite/static/js/pad_savedrevs').padsavedrevs;
|
var padsavedrevs = require('./pad_savedrevs').padsavedrevs;
|
||||||
padsavedrevs.handleResizePage();
|
padsavedrevs.handleResizePage();
|
||||||
},
|
},
|
||||||
hideLaterIfNoOtherInteraction: function()
|
hideLaterIfNoOtherInteraction: function()
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var padutils = require('ep_etherpad-lite/static/js/pad_utils').padutils;
|
var padutils = require('./pad_utils').padutils;
|
||||||
var padeditor = require('ep_etherpad-lite/static/js/pad_editor').padeditor;
|
var padeditor = require('./pad_editor').padeditor;
|
||||||
var padsavedrevs = require('ep_etherpad-lite/static/js/pad_savedrevs').padsavedrevs;
|
var padsavedrevs = require('./pad_savedrevs').padsavedrevs;
|
||||||
|
|
||||||
function indexOf(array, value) {
|
function indexOf(array, value) {
|
||||||
for (var i = 0, ii = array.length; i < ii; i++) {
|
for (var i = 0, ii = array.length; i < ii; i++) {
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var padcookie = require('ep_etherpad-lite/static/js/pad_cookie').padcookie;
|
var padcookie = require('./pad_cookie').padcookie;
|
||||||
var padutils = require('ep_etherpad-lite/static/js/pad_utils').padutils;
|
var padutils = require('./pad_utils').padutils;
|
||||||
|
|
||||||
var padeditor = (function()
|
var padeditor = (function()
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,7 @@ var padeditor = (function()
|
||||||
viewZoom: 100,
|
viewZoom: 100,
|
||||||
init: function(readyFunc, initialViewOptions, _pad)
|
init: function(readyFunc, initialViewOptions, _pad)
|
||||||
{
|
{
|
||||||
Ace2Editor = require('ep_etherpad-lite/static/js/ace').Ace2Editor;
|
Ace2Editor = require('./ace').Ace2Editor;
|
||||||
pad = _pad;
|
pad = _pad;
|
||||||
settings = pad.settings;
|
settings = pad.settings;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var paddocbar = require('ep_etherpad-lite/static/js/pad_docbar').paddocbar;
|
var paddocbar = require('./pad_docbar').paddocbar;
|
||||||
|
|
||||||
var padimpexp = (function()
|
var padimpexp = (function()
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var padutils = require('ep_etherpad-lite/static/js/pad_utils').padutils;
|
var padutils = require('./pad_utils').padutils;
|
||||||
var paddocbar = require('ep_etherpad-lite/static/js/pad_docbar').paddocbar;
|
var paddocbar = require('./pad_docbar').paddocbar;
|
||||||
|
|
||||||
var padmodals = (function()
|
var padmodals = (function()
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var padutils = require('ep_etherpad-lite/static/js/pad_utils').padutils;
|
var padutils = require('./pad_utils').padutils;
|
||||||
var paddocbar = require('ep_etherpad-lite/static/js/pad_docbar').paddocbar;
|
var paddocbar = require('./pad_docbar').paddocbar;
|
||||||
|
|
||||||
var padsavedrevs = (function()
|
var padsavedrevs = (function()
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var padutils = require('ep_etherpad-lite/static/js/pad_utils').padutils;
|
var padutils = require('./pad_utils').padutils;
|
||||||
|
|
||||||
var myUserInfo = {};
|
var myUserInfo = {};
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Security = require('ep_etherpad-lite/static/js/security');
|
var Security = require('./security');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates a random String with the given length. Is needed to generate the Author, Group, readonly, session Ids
|
* Generates a random String with the given length. Is needed to generate the Author, Group, readonly, session Ids
|
||||||
|
@ -75,7 +75,7 @@ var padutils = {
|
||||||
},
|
},
|
||||||
uniqueId: function()
|
uniqueId: function()
|
||||||
{
|
{
|
||||||
var pad = require('ep_etherpad-lite/static/js/pad').pad; // Sidestep circular dependency
|
var pad = require('./pad').pad; // Sidestep circular dependency
|
||||||
function encodeNum(n, width)
|
function encodeNum(n, width)
|
||||||
{
|
{
|
||||||
// returns string that is exactly 'width' chars, padding with zeros
|
// returns string that is exactly 'width' chars, padding with zeros
|
||||||
|
@ -250,7 +250,7 @@ var padutils = {
|
||||||
},
|
},
|
||||||
timediff: function(d)
|
timediff: function(d)
|
||||||
{
|
{
|
||||||
var pad = require('ep_etherpad-lite/static/js/pad').pad; // Sidestep circular dependency
|
var pad = require('./pad').pad; // Sidestep circular dependency
|
||||||
function format(n, word)
|
function format(n, word)
|
||||||
{
|
{
|
||||||
n = Math.round(n);
|
n = Math.round(n);
|
||||||
|
@ -502,17 +502,26 @@ var padutils = {
|
||||||
|
|
||||||
var globalExceptionHandler = undefined;
|
var globalExceptionHandler = undefined;
|
||||||
function setupGlobalExceptionHandler() {
|
function setupGlobalExceptionHandler() {
|
||||||
//send javascript errors to the server
|
|
||||||
if (!globalExceptionHandler) {
|
if (!globalExceptionHandler) {
|
||||||
globalExceptionHandler = function test (msg, url, linenumber)
|
globalExceptionHandler = function test (msg, url, linenumber)
|
||||||
{
|
{
|
||||||
var errObj = {errorInfo: JSON.stringify({msg: msg, url: url, linenumber: linenumber, userAgent: navigator.userAgent})};
|
var errorId = randomString(20);
|
||||||
var loc = document.location;
|
if ($("#editorloadingbox").attr("display") != "none"){
|
||||||
var url = loc.protocol + "//" + loc.hostname + ":" + loc.port + "/" + loc.pathname.substr(1, loc.pathname.indexOf("/p/")) + "jserror";
|
//show javascript errors to the user
|
||||||
|
$("#editorloadingbox").css("padding", "10px");
|
||||||
|
$("#editorloadingbox").css("padding-top", "45px");
|
||||||
|
$("#editorloadingbox").html("<div style='text-align:left;color:red;font-size:16px;'><b>An error occured</b><br>The error was reported with the following id: '" + errorId + "'<br><br><span style='color:black;font-weight:bold;font-size:16px'>Please send this error message to us: </span><div style='color:black;font-size:14px'>'"
|
||||||
|
+ "ErrorId: " + errorId + "<br>UserAgent: " + navigator.userAgent + "<br>" + msg + " in " + url + " at line " + linenumber + "'</div></div>");
|
||||||
|
}
|
||||||
|
|
||||||
|
//send javascript errors to the server
|
||||||
|
var errObj = {errorInfo: JSON.stringify({errorId: errorId, msg: msg, url: url, linenumber: linenumber, userAgent: navigator.userAgent})};
|
||||||
|
var loc = document.location;
|
||||||
|
var url = loc.protocol + "//" + loc.hostname + ":" + loc.port + "/" + loc.pathname.substr(1, loc.pathname.indexOf("/p/")) + "jserror";
|
||||||
|
|
||||||
$.post(url, errObj);
|
$.post(url, errObj);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
window.onerror = globalExceptionHandler;
|
window.onerror = globalExceptionHandler;
|
||||||
}
|
}
|
||||||
|
@ -520,7 +529,7 @@ function setupGlobalExceptionHandler() {
|
||||||
|
|
||||||
padutils.setupGlobalExceptionHandler = setupGlobalExceptionHandler;
|
padutils.setupGlobalExceptionHandler = setupGlobalExceptionHandler;
|
||||||
|
|
||||||
padutils.binarySearch = require('ep_etherpad-lite/static/js/ace2_common').binarySearch;
|
padutils.binarySearch = require('./ace2_common').binarySearch;
|
||||||
|
|
||||||
exports.randomString = randomString;
|
exports.randomString = randomString;
|
||||||
exports.createCookie = createCookie;
|
exports.createCookie = createCookie;
|
||||||
|
|
|
@ -22,13 +22,13 @@
|
||||||
|
|
||||||
// These jQuery things should create local references, but for now `require()`
|
// These jQuery things should create local references, but for now `require()`
|
||||||
// assigns to the global `$` and augments it with plugins.
|
// assigns to the global `$` and augments it with plugins.
|
||||||
require('ep_etherpad-lite/static/js/jquery');
|
require('./jquery');
|
||||||
JSON = require('ep_etherpad-lite/static/js/json2');
|
JSON = require('./json2');
|
||||||
require('ep_etherpad-lite/static/js/undo-xpopup');
|
require('./undo-xpopup');
|
||||||
|
|
||||||
var createCookie = require('ep_etherpad-lite/static/js/pad_utils').createCookie;
|
var createCookie = require('./pad_utils').createCookie;
|
||||||
var readCookie = require('ep_etherpad-lite/static/js/pad_utils').readCookie;
|
var readCookie = require('./pad_utils').readCookie;
|
||||||
var randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
|
var randomString = require('./pad_utils').randomString;
|
||||||
|
|
||||||
var socket, token, padId, export_links;
|
var socket, token, padId, export_links;
|
||||||
|
|
||||||
|
@ -127,12 +127,12 @@ function handleClientVars(message)
|
||||||
clientVars = message.data;
|
clientVars = message.data;
|
||||||
|
|
||||||
//load all script that doesn't work without the clientVars
|
//load all script that doesn't work without the clientVars
|
||||||
BroadcastSlider = require('ep_etherpad-lite/static/js/broadcast_slider').loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded);
|
BroadcastSlider = require('./broadcast_slider').loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded);
|
||||||
require('ep_etherpad-lite/static/js/broadcast_revisions').loadBroadcastRevisionsJS();
|
require('./broadcast_revisions').loadBroadcastRevisionsJS();
|
||||||
changesetLoader = require('ep_etherpad-lite/static/js/broadcast').loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, BroadcastSlider);
|
changesetLoader = require('./broadcast').loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, BroadcastSlider);
|
||||||
|
|
||||||
//initialize export ui
|
//initialize export ui
|
||||||
require('ep_etherpad-lite/static/js/pad_impexp').padimpexp.init();
|
require('./pad_impexp').padimpexp.init();
|
||||||
|
|
||||||
//change export urls when the slider moves
|
//change export urls when the slider moves
|
||||||
var export_rev_regex = /(\/\d+)?\/export/
|
var export_rev_regex = /(\/\d+)?\/export/
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
var Changeset = require('./Changeset');
|
||||||
var extend = require('ep_etherpad-lite/static/js/ace2_common').extend;
|
var extend = require('./ace2_common').extend;
|
||||||
|
|
||||||
var undoModule = (function()
|
var undoModule = (function()
|
||||||
{
|
{
|
||||||
|
|
|
@ -260,24 +260,24 @@
|
||||||
<script type="text/javascript" src="../static/js/require-kernel.js"></script>
|
<script type="text/javascript" src="../static/js/require-kernel.js"></script>
|
||||||
<script type="text/javascript" src="../static/js/jquery.js"></script>
|
<script type="text/javascript" src="../static/js/jquery.js"></script>
|
||||||
<script type="text/javascript" src="../socket.io/socket.io.js"></script>
|
<script type="text/javascript" src="../socket.io/socket.io.js"></script>
|
||||||
<script type="text/javascript" src="../minified/pad.js?callback=require.define"></script>
|
<script type="text/javascript" src="../javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var clientVars = {};
|
var clientVars = {};
|
||||||
(function () {
|
(function () {
|
||||||
require.setRootURI("../minified/");
|
require.setRootURI("../javascripts/src");
|
||||||
require.setLibraryURI("../minified/plugins/");
|
require.setLibraryURI("../javascripts/lib");
|
||||||
require.setGlobalKeyPath("require");
|
require.setGlobalKeyPath("require");
|
||||||
|
|
||||||
var plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins');
|
var plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins');
|
||||||
plugins.update(function () {
|
plugins.update(function () {
|
||||||
require('ep_etherpad-lite/static/js/pad').init();
|
require('ep_etherpad-lite/static/js/pad').init();
|
||||||
|
});
|
||||||
|
|
||||||
/* TODO: These globals shouldn't exist. */
|
/* TODO: These globals shouldn't exist. */
|
||||||
pad = require('ep_etherpad-lite/static/js/pad').pad;
|
pad = require('ep_etherpad-lite/static/js/pad').pad;
|
||||||
chat = require('ep_etherpad-lite/static/js/chat').chat;
|
chat = require('ep_etherpad-lite/static/js/chat').chat;
|
||||||
padeditbar = require('ep_etherpad-lite/static/js/pad_editbar').padeditbar;
|
padeditbar = require('ep_etherpad-lite/static/js/pad_editbar').padeditbar;
|
||||||
padimpexp = require('ep_etherpad-lite/static/js/pad_impexp').padimpexp;
|
padimpexp = require('ep_etherpad-lite/static/js/pad_impexp').padimpexp;
|
||||||
});
|
|
||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -200,13 +200,13 @@
|
||||||
<script type="text/javascript" src="../../../static/js/require-kernel.js"></script>
|
<script type="text/javascript" src="../../../static/js/require-kernel.js"></script>
|
||||||
<script type="text/javascript" src="../../../static/js/jquery.js"></script>
|
<script type="text/javascript" src="../../../static/js/jquery.js"></script>
|
||||||
<script type="text/javascript" src="../../../socket.io/socket.io.js"></script>
|
<script type="text/javascript" src="../../../socket.io/socket.io.js"></script>
|
||||||
<script type="text/javascript" src="../../../minified/timeslider.js?callback=require.define"></script>
|
<script type="text/javascript" src="../../../javascripts/lib/ep_etherpad-lite/static/js/timeslider.js?callback=require.define"></script>
|
||||||
<script type="text/javascript" src="../../../static/custom/timeslider.js"></script>
|
<script type="text/javascript" src="../../../static/custom/timeslider.js"></script>
|
||||||
<script type="text/javascript" >
|
<script type="text/javascript" >
|
||||||
var clientVars = {};
|
var clientVars = {};
|
||||||
(function () {
|
(function () {
|
||||||
require.setRootURI("../../../minified/");
|
require.setRootURI("../../../javascripts/src");
|
||||||
require.setLibraryURI("../../../minified/plugins/");
|
require.setLibraryURI("../../../javascripts/lib");
|
||||||
require.setGlobalKeyPath("require");
|
require.setGlobalKeyPath("require");
|
||||||
|
|
||||||
var plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins');
|
var plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue