mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
Merge branch 'develop' of github.com:Pita/etherpad-lite into develop
This commit is contained in:
commit
4f04d14cab
23 changed files with 364 additions and 61 deletions
|
@ -21,31 +21,49 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var log4js = require('log4js')
|
||||
, async = require('async')
|
||||
;
|
||||
|
||||
// set up logger
|
||||
var log4js = require('log4js');
|
||||
log4js.replaceConsole();
|
||||
|
||||
var settings = require('./utils/Settings');
|
||||
|
||||
//set loglevel
|
||||
log4js.setGlobalLogLevel(settings.loglevel);
|
||||
|
||||
var db = require('./db/DB');
|
||||
var async = require('async');
|
||||
var plugins = require("ep_etherpad-lite/static/js/pluginfw/plugins");
|
||||
var hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks");
|
||||
var settings
|
||||
, db
|
||||
, plugins
|
||||
, hooks;
|
||||
var npm = require("npm/lib/npm.js");
|
||||
|
||||
hooks.plugins = plugins;
|
||||
|
||||
async.waterfall([
|
||||
// load npm
|
||||
function(callback) {
|
||||
npm.load({}, function(er) {
|
||||
callback(er)
|
||||
})
|
||||
},
|
||||
|
||||
// load everything
|
||||
function(callback) {
|
||||
settings = require('./utils/Settings');
|
||||
db = require('./db/DB');
|
||||
plugins = require("ep_etherpad-lite/static/js/pluginfw/plugins");
|
||||
hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks");
|
||||
hooks.plugins = plugins;
|
||||
|
||||
//set loglevel
|
||||
log4js.setGlobalLogLevel(settings.loglevel);
|
||||
callback();
|
||||
},
|
||||
|
||||
//initalize the database
|
||||
function (callback)
|
||||
{
|
||||
db.init(callback);
|
||||
},
|
||||
|
||||
plugins.update,
|
||||
function(callback) {
|
||||
plugins.update(callback)
|
||||
},
|
||||
|
||||
function (callback) {
|
||||
console.info("Installed plugins: " + plugins.formatPlugins());
|
||||
|
|
|
@ -37,7 +37,7 @@ exports.ip = "0.0.0.0";
|
|||
/**
|
||||
* The Port ep-lite should listen to
|
||||
*/
|
||||
exports.port = 9001;
|
||||
exports.port = process.env.PORT || 9001;
|
||||
/*
|
||||
* The Type of the database
|
||||
*/
|
||||
|
|
|
@ -5,9 +5,10 @@
|
|||
"keywords" : ["etherpad", "realtime", "collaborative", "editor"],
|
||||
"author" : "Peter 'Pita' Martischka <petermartischka@googlemail.com> - Primary Technology Ltd",
|
||||
"contributors" : [
|
||||
{ "name": "John McLear",
|
||||
"name": "Hans Pinckaers",
|
||||
"name": "Robin Buse" }
|
||||
{ "name": "John McLear" },
|
||||
{ "name": "Hans Pinckaers" },
|
||||
{ "name": "Robin Buse" },
|
||||
{ "name": "Marcel Klehr" }
|
||||
],
|
||||
"dependencies" : {
|
||||
"yajsml" : "1.1.6",
|
||||
|
@ -25,7 +26,8 @@
|
|||
"log4js" : "0.5.x",
|
||||
"jsdom-nocontextifiy" : "0.2.10",
|
||||
"async-stacktrace" : "0.0.2",
|
||||
"npm" : "1.1.24",
|
||||
"npm" : "1.1.x",
|
||||
"npm-registry-client" : "0.2.10",
|
||||
"ejs" : "0.6.1",
|
||||
"graceful-fs" : "1.1.5",
|
||||
"slide" : "1.1.3",
|
||||
|
|
|
@ -311,7 +311,7 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
|
|||
['insertorder', 'first']
|
||||
].concat(
|
||||
_.map(state.lineAttributes,function(value,key){
|
||||
if (window.console) console.log([key, value])
|
||||
if (typeof(window)!= 'undefined' && window.console) console.log([key, value])
|
||||
return [key, value];
|
||||
})
|
||||
);
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
var plugins = require("ep_etherpad-lite/static/js/pluginfw/plugins");
|
||||
var hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks");
|
||||
var npm = require("npm");
|
||||
var registry = require("npm/lib/utils/npm-registry-client/index.js");
|
||||
var RegClient = require("npm-registry-client")
|
||||
|
||||
var registry = new RegClient(
|
||||
{ registry: "http://registry.npmjs.org"
|
||||
, cache: npm.cache }
|
||||
);
|
||||
|
||||
var withNpm = function (npmfn, final, cb) {
|
||||
npm.load({}, function (er) {
|
||||
|
@ -72,7 +77,7 @@ exports.search = function(query, cache, cb) {
|
|||
cb(null, exports.searchCache);
|
||||
} else {
|
||||
registry.get(
|
||||
"/-/all", null, 600, false, true,
|
||||
"/-/all", 600, false, true,
|
||||
function (er, data) {
|
||||
if (er) return cb(er);
|
||||
exports.searchCache = data;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
var npm = require("npm/lib/npm.js");
|
||||
var readInstalled = require("./read-installed.js");
|
||||
var relativize = require("npm/lib/utils/relativize.js");
|
||||
var readJson = require("npm/lib/utils/read-json.js");
|
||||
var path = require("path");
|
||||
var async = require("async");
|
||||
var fs = require("fs");
|
||||
|
|
|
@ -94,8 +94,21 @@ var npm = require("npm/lib/npm.js")
|
|||
, path = require("path")
|
||||
, asyncMap = require("slide").asyncMap
|
||||
, semver = require("semver")
|
||||
, readJson = require("npm/lib/utils/read-json.js")
|
||||
, log = require("npm/lib/utils/log.js")
|
||||
, log = require("log4js").getLogger('pluginfw')
|
||||
|
||||
function readJson(file, callback) {
|
||||
fs.readFile(file, function(er, buf) {
|
||||
if(er) {
|
||||
callback(er);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
callback( null, JSON.parse(buf.toString()) )
|
||||
} catch(er) {
|
||||
callback(er)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = readInstalled
|
||||
|
||||
|
@ -274,7 +287,7 @@ function findUnmet (obj) {
|
|||
}
|
||||
|
||||
})
|
||||
log.verbose([obj._id], "returning")
|
||||
log.debug([obj._id], "returning")
|
||||
return obj
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,29 @@
|
|||
<html>
|
||||
|
||||
<title>Etherpad Lite</title>
|
||||
<script>
|
||||
/*
|
||||
|@licstart The following is the entire license notice for the
|
||||
JavaScript code in this page.|
|
||||
|
||||
Copyright 2011 Peter Martischka, Primary Technology.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|@licend The above is the entire license notice
|
||||
for the JavaScript code in this page.|
|
||||
*/
|
||||
</script>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
|
||||
|
@ -9,9 +32,11 @@
|
|||
<link rel="shortcut icon" href="favicon.ico">
|
||||
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
color: #333;
|
||||
font: 14px helvetica, sans-serif;
|
||||
background: #ddd;
|
||||
|
|
|
@ -3,8 +3,30 @@
|
|||
%>
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<title>Etherpad Lite</title>
|
||||
<script>
|
||||
/*
|
||||
|@licstart The following is the entire license notice for the
|
||||
JavaScript code in this page.|
|
||||
|
||||
Copyright 2011 Peter Martischka, Primary Technology.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|@licend The above is the entire license notice
|
||||
for the JavaScript code in this page.|
|
||||
*/
|
||||
</script>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
|
@ -233,7 +255,7 @@
|
|||
</div>
|
||||
<div class="reconnecting">
|
||||
<h1>Reestablishing connection...</h1>
|
||||
<p><img alt="" border="0" src="/static/img/connectingbar.gif" /></p>
|
||||
<p><img alt="" border="0" src="../static/img/connectingbar.gif" /></p>
|
||||
</div>
|
||||
<div class="userdup">
|
||||
<h1>Opened in another window.</h1>
|
||||
|
|
|
@ -1,11 +1,32 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<title>Etherpad Lite Timeslider</title>
|
||||
<script>
|
||||
/*
|
||||
|@licstart The following is the entire license notice for the
|
||||
JavaScript code in this page.|
|
||||
|
||||
Copyright 2011 Peter Martischka, Primary Technology.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|@licend The above is the entire license notice
|
||||
for the JavaScript code in this page.|
|
||||
*/
|
||||
</script>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
|
||||
<title>Etherpad Lite Timeslider</title>
|
||||
|
||||
<link rel="shortcut icon" href="../../favicon.ico">
|
||||
<link rel="stylesheet" href="../../static/css/pad.css">
|
||||
<link rel="stylesheet" href="../../static/css/timeslider.css">
|
||||
|
@ -83,7 +104,7 @@
|
|||
</div>
|
||||
<div class="reconnecting">
|
||||
<h1>Reestablishing connection...</h1>
|
||||
<p><img alt="" border="0" src="/static/img/connectingbar.gif" /></p>
|
||||
<p><img alt="" border="0" src="../../static/img/connectingbar.gif" /></p>
|
||||
</div>
|
||||
<div class="userdup">
|
||||
<h1>Opened in another window.</h1>
|
||||
|
|
32
src/web.config
Normal file
32
src/web.config
Normal file
|
@ -0,0 +1,32 @@
|
|||
<configuration>
|
||||
<system.webServer>
|
||||
|
||||
<handlers>
|
||||
<add name="iisnode" path="node_modules/ep_etherpad-lite/node/server.js" verb="*" modules="iisnode" />
|
||||
</handlers>
|
||||
|
||||
<rewrite>
|
||||
<rules>
|
||||
<!-- uncomment this section to enable debugging
|
||||
<rule name="LogFile" patternSyntax="ECMAScript" stopProcessing="true">
|
||||
<match url="iisnode"/>
|
||||
<action type="Rewrite" url="node_modules/ep_etherpad-lite/node/iisnode" />
|
||||
</rule>
|
||||
<rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">
|
||||
<match url="^server.js\/debug[\/]?" />
|
||||
</rule>
|
||||
-->
|
||||
<rule name="StaticContent">
|
||||
<action type="Rewrite" url="public{{REQUEST_URI}}"/>
|
||||
</rule>
|
||||
<rule name="DynamicContent">
|
||||
<conditions>
|
||||
<add input="{{REQUEST_FILENAME}}" matchType="IsFile" negate="True"/>
|
||||
</conditions>
|
||||
<action type="Rewrite" url="node_modules/ep_etherpad-lite/node/server.js" />
|
||||
</rule>
|
||||
</rules>
|
||||
</rewrite>
|
||||
|
||||
</system.webServer>
|
||||
</configuration>
|
Loading…
Add table
Add a link
Reference in a new issue