From 54511a6ceaf8889441fdb0ef4482c9ca2e47f212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bartelme=C3=9F?= Date: Tue, 22 May 2012 09:27:08 +0200 Subject: [PATCH 1/4] fix #722 by better argument checking in PadMessageHandler.js --- node/handler/PadMessageHandler.js | 39 +++++++++++++++---------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/node/handler/PadMessageHandler.js b/node/handler/PadMessageHandler.js index 48f0aa98..135b4b63 100644 --- a/node/handler/PadMessageHandler.js +++ b/node/handler/PadMessageHandler.js @@ -170,26 +170,25 @@ exports.handleMessage = function(client, message) { handleClientReady(client, message); } - else if(message.type == "COLLABROOM" && - message.data.type == "USER_CHANGES") - { - handleUserChanges(client, message); - } - else if(message.type == "COLLABROOM" && - message.data.type == "USERINFO_UPDATE") - { - handleUserInfoUpdate(client, message); - } - else if(message.type == "COLLABROOM" && - message.data.type == "CHAT_MESSAGE") - { - handleChatMessage(client, message); - } - else if(message.type == "COLLABROOM" && - message.data.type == "CLIENT_MESSAGE" && - message.data.payload.type == "suggestUserName") - { - handleSuggestUserName(client, message); + else if(message.type == "COLLABROOM" && typeof message.data == 'object'){ + if (message.data.type == "USER_CHANGES") + { + handleUserChanges(client, message); + } + else if (message.data.type == "USERINFO_UPDATE") + { + handleUserInfoUpdate(client, message); + } + else if(message.data.type == "CHAT_MESSAGE") + { + handleChatMessage(client, message); + } + else if(message.data.type == "CLIENT_MESSAGE" && + typeof message.data.payload == 'object' && + message.data.payload.type == "suggestUserName") + { + handleSuggestUserName(client, message); + } } //if the message type is unknown, throw an exception else From afb868fd2b4e28b7ae8edefb5c40e7854fb297cb Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 30 May 2012 00:20:03 +0200 Subject: [PATCH 2/4] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f53fa3b9..5810ed25 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 From 27f25b8c61b18f290a72cf154aa8462ed5bce338 Mon Sep 17 00:00:00 2001 From: Egil Moeller Date: Wed, 30 May 2012 17:18:43 +0200 Subject: [PATCH 3/4] Added hook to catch edit events --- src/static/js/ace2_inner.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 723d410f..cc9f1288 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -341,6 +341,11 @@ function Ace2Inner(){ return rep; }; + editorInfo.ace_getAuthor = function() + { + return thisAuthor; + } + var currentCallStack = null; function inCallStack(type, action) @@ -439,6 +444,14 @@ function Ace2Inner(){ try { result = action(); + + hooks.callAll('aceEditEvent', { + callstack: currentCallStack, + editorInfo: editorInfo, + rep: rep, + documentAttributeManager: documentAttributeManager + }); + //console.log("Just did action for: "+type); cleanExit = true; } @@ -522,6 +535,7 @@ function Ace2Inner(){ { return rep.lines.atOffset(charOffset).key; } + function dispose() { From e23da5127b2d279124a3783255cc8099439856f4 Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 30 May 2012 23:59:06 +0200 Subject: [PATCH 4/4] No longer need bin/installDeps.sh --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2a30b970..6cdb623f 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):**
    -
  1. Move to a folder where you want to install Etherpad Lite. Clone the git repository git clone 'git://github.com/Pita/etherpad-lite.git'
     
  2. -
  3. Change into the directory containing the Etherpad Lite source code clone with cd etherpad-lite
  4. -
  5. Install the dependencies with bin/installDeps.sh
     
  6. +
  7. Move to a folder where you want to install Etherpad Lite. Clone the git repository git clone 'git://github.com/Pita/etherpad-lite.git'
  8. +
  9. Change into the directory containing the Etherpad Lite source code clone with cd etherpad-lite
  10. Start it with bin/run.sh
     
  11. Open your web browser and visit http://localhost:9001. You like it? Look at the 'Next Steps' section below