diff --git a/CHANGELOG.md b/CHANGELOG.md
index f53fa3b9b..5810ed255 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+# v1.1
+* Introduced Plugin framework
+* Many bugfixes
+* Faster page loading
+* Various UI polishes
+* Saved Revisions
+* Read only Real time view
+* More API functionality
+
# v 1.0.1
* Updated MySQL driver, this fixes some problems with mysql
diff --git a/README.md b/README.md
index 2a30b9708..6cdb623f3 100644
--- a/README.md
+++ b/README.md
@@ -72,9 +72,8 @@ Here is the **[FAQ](https://github.com/Pita/etherpad-lite/wiki/FAQ)**
**As any user (we recommend creating a separate user called etherpad-lite):**
-
Move to a folder where you want to install Etherpad Lite. Clone the git repository git clone 'git://github.com/Pita/etherpad-lite.git'
-
Change into the directory containing the Etherpad Lite source code clone with cd etherpad-lite
-
Install the dependencies with bin/installDeps.sh
+
Move to a folder where you want to install Etherpad Lite. Clone the git repository git clone 'git://github.com/Pita/etherpad-lite.git'
+
Change into the directory containing the Etherpad Lite source code clone with cd etherpad-lite
Start it with bin/run.sh
Open your web browser and visit http://localhost:9001. You like it? Look at the 'Next Steps' section below
diff --git a/bin/buildForWindows.sh b/bin/buildForWindows.sh
index 6e46e29a1..1d47bff1b 100755
--- a/bin/buildForWindows.sh
+++ b/bin/buildForWindows.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-NODE_VERSION="0.6.5"
+NODE_VERSION="0.8.4"
#Move to the folder where ep-lite is installed
cd `dirname $0`
@@ -41,7 +41,7 @@ echo "do a normal unix install first..."
bin/installDeps.sh || exit 1
echo "copy the windows settings template..."
-cp settings.json.template_windows settings.json
+cp settings.json.template settings.json
echo "resolve symbolic links..."
cp -rL node_modules node_modules_resolved
@@ -50,7 +50,7 @@ mv node_modules_resolved node_modules
echo "download windows node..."
cd bin
-wget "http://nodejs.org/dist/v$NODE_VERSION/node.exe" -O node.exe
+wget "http://nodejs.org/dist/v$NODE_VERSION/node.exe" -O ../node.exe
echo "create the zip..."
cd /tmp
diff --git a/bin/installDeps.sh b/bin/installDeps.sh
index 2acebd82e..9f691e0af 100755
--- a/bin/installDeps.sh
+++ b/bin/installDeps.sh
@@ -35,8 +35,9 @@ fi
#check node version
NODE_VERSION=$(node --version)
-if [ ! $(echo $NODE_VERSION | cut -d "." -f 1-2) = "v0.6" ]; then
- echo "You're running a wrong version of node, you're using $NODE_VERSION, we need v0.6.x" >&2
+NODE_V_MINOR=$(echo $NODE_VERSION | cut -d "." -f 1-2)
+if [ ! $NODE_V_MINOR = "v0.8" ] && [ ! $NODE_V_MINOR = "v0.6" ]; then
+ echo "You're running a wrong version of node, you're using $NODE_VERSION, we need v0.6.x or v0.8.x" >&2
exit 1
fi
diff --git a/bin/installOnWindows.bat b/bin/installOnWindows.bat
new file mode 100644
index 000000000..c46ac0340
--- /dev/null
+++ b/bin/installOnWindows.bat
@@ -0,0 +1,39 @@
+@echo off
+
+:: change directory to etherpad-lite root
+cd /D "%~dp0\.."
+
+:: Is node installed?
+cmd /C node -e "" || ( echo "Please install node.js ( http://nodejs.org )" && exit /B 1 )
+
+echo _
+echo Checking node version...
+set check_version="if(['6','8'].indexOf(process.version.split('.')[1].toString()) === -1) { console.log('You are running a wrong version of Node. Etherpad Lite requires v0.6.x or v0.8.x'); process.exit(1) }"
+cmd /C node -e %check_version% || exit /B 1
+
+echo _
+echo Installing etherpad-lite and dependencies...
+cmd /C npm install src/ || exit /B 1
+
+echo _
+echo Copying custom templates...
+set custom_dir=node_modules\ep_etherpad-lite\static\custom
+FOR %%f IN (index pad timeslider) DO (
+ if NOT EXIST "%custom_dir%\%%f.js" copy "%custom_dir%\js.template" "%custom_dir%\%%f.js"
+ if NOT EXIST "%custom_dir%\%%f.css" copy "%custom_dir%\css.template" "%custom_dir%\%%f.css"
+)
+
+echo _
+echo Clearing cache...
+del /S var\minified*
+
+echo _
+echo Setting up settings.json...
+IF NOT EXIST settings.json (
+ echo Can't find settings.json.
+ echo Copying settings.json.template...
+ cmd /C copy settings.json.template settings.json || exit /B 1
+)
+
+echo _
+echo Installed Etherpad-lite!
\ No newline at end of file
diff --git a/settings.json.template_windows b/settings.json.template_windows
deleted file mode 100644
index 35b54d8da..000000000
--- a/settings.json.template_windows
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- This file must be valid JSON. But comments are allowed
-
- Please edit settings.json, not settings.json.template
-*/
-{
- //Ip and port which etherpad should bind at
- "ip": "0.0.0.0",
- "port" : 9001,
-
- //The Type of the database. You can choose between sqlite and mysql
- "dbType" : "dirty",
- //the database specific settings
- "dbSettings" : {
- "filename" : "var/dirty.db"
- },
-
- /* An Example of MySQL Configuration
- "dbType" : "mysql",
- "dbSettings" : {
- "user" : "root",
- "host" : "localhost",
- "password": "",
- "database": "store"
- },
- */
-
- //the default text of a pad
- "defaultPadText" : "Welcome to Etherpad Lite!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nEtherpad Lite on Github: http:\/\/j.mp/ep-lite\n",
-
- /* Users must have a session to access pads. This effectively allows only group pads to be accessed. */
- "requireSession" : false,
-
- /* Users may edit pads but not create new ones. Pad creation is only via the API. This applies both to group pads and regular pads. */
- "editOnly" : false,
-
- /* if true, all css & js will be minified before sending to the client. This will improve the loading performance massivly,
- but makes it impossible to debug the javascript/css */
- "minify" : false,
-
- /* This is the path to the Abiword executable. Setting it to null, disables abiword.
- Abiword is needed to enable the import/export of pads*/
- "abiword" : null,
-
- /* cache 6 hours = 1000*60*60*6 */
- "maxAge": 21600000
-
-}
diff --git a/src/ep.json b/src/ep.json
index 6bc777350..ce6d3a00f 100644
--- a/src/ep.json
+++ b/src/ep.json
@@ -1,5 +1,9 @@
{
"parts": [
+ { "name": "express", "hooks": {
+ "createServer": "ep_etherpad-lite/node/hooks/express:createServer",
+ "restartServer": "ep_etherpad-lite/node/hooks/express:restartServer"
+ } },
{ "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": "padurlsanitize", "hooks": { "expressCreateServer": "ep_etherpad-lite/node/hooks/express/padurlsanitize:expressCreateServer" } },
diff --git a/src/node/db/API.js b/src/node/db/API.js
index 37fd3f161..64ddef68b 100644
--- a/src/node/db/API.js
+++ b/src/node/db/API.js
@@ -47,6 +47,8 @@ exports.createGroupPad = groupManager.createGroupPad;
exports.createAuthor = authorManager.createAuthor;
exports.createAuthorIfNotExistsFor = authorManager.createAuthorIfNotExistsFor;
+exports.listPadsOfAuthor = authorManager.listPadsOfAuthor;
+exports.padUsersCount = padMessageHandler.padUsersCount;
/**********************/
/**SESSION FUNCTIONS***/
@@ -152,6 +154,13 @@ Example returns:
*/
exports.setText = function(padID, text, callback)
{
+ //text is required
+ if(typeof text != "string")
+ {
+ callback(new customError("text is no string","apierror"));
+ return;
+ }
+
//get the pad
getPadSafe(padID, true, function(err, pad)
{
@@ -282,6 +291,27 @@ exports.getRevisionsCount = function(padID, callback)
});
}
+/**
+getLastEdited(padID) returns the timestamp of the last revision of the pad
+
+Example returns:
+
+{code: 0, message:"ok", data: {lastEdited: 1340815946602}}
+{code: 1, message:"padID does not exist", data: null}
+*/
+exports.getLastEdited = function(padID, callback)
+{
+ //get the pad
+ getPadSafe(padID, true, function(err, pad)
+ {
+ if(ERR(err, callback)) return;
+ pad.getLastEdit(function(err, value) {
+ if(ERR(err, callback)) return;
+ callback(null, {lastEdited: value});
+ });
+ });
+}
+
/**
createPad(padName [, text]) creates a new pad in this group
@@ -463,6 +493,59 @@ exports.isPasswordProtected = function(padID, callback)
});
}
+/**
+listAuthorsOfPad(padID) returns an array of authors who contributed to this pad
+
+Example returns:
+
+{code: 0, message:"ok", data: {authorIDs : ["a.s8oes9dhwrvt0zif", "a.akf8finncvomlqva"]}
+{code: 1, message:"padID does not exist", data: null}
+*/
+exports.listAuthorsOfPad = function(padID, callback)
+{
+ //get the pad
+ getPadSafe(padID, true, function(err, pad)
+ {
+ if(ERR(err, callback)) return;
+
+ callback(null, {authorIDs: pad.getAllAuthors()});
+ });
+}
+
+/**
+sendClientsMessage(padID, msg) sends a message to all clients connected to the
+pad, possibly for the purpose of signalling a plugin.
+
+Note, this will only accept strings from the HTTP API, so sending bogus changes
+or chat messages will probably not be possible.
+
+The resulting message will be structured like so:
+
+{
+ type: 'COLLABROOM',
+ data: {
+ type: ,
+ time: