summaryrefslogtreecommitdiff
path: root/src/node
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2012-03-26 08:10:58 -0700
committerJohn McLear <john@mclear.co.uk>2012-03-26 08:10:58 -0700
commitbeec69ac1c7f87925133013f54d26d6497b0da04 (patch)
tree07cc5c0259ead2ef0ee2322ca38ffaf1675d4c81 /src/node
parentf2ea56334d8960a3a6894be8f261e8aa923f61fd (diff)
parent1478820d604a367896c58d7db729b7767cd2dab8 (diff)
downloadetherpad-lite-beec69ac1c7f87925133013f54d26d6497b0da04.zip
Merge pull request #556 from fourplusone/feature_jquery
added jQuery to ace2_inner, make it embeddable, ace hooks work now propertly in ace2_inner
Diffstat (limited to 'src/node')
-rw-r--r--src/node/handler/PadMessageHandler.js11
-rw-r--r--src/node/utils/tar.json4
2 files changed, 12 insertions, 3 deletions
diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js
index e26bb46e..26748517 100644
--- a/src/node/handler/PadMessageHandler.js
+++ b/src/node/handler/PadMessageHandler.js
@@ -128,7 +128,11 @@ exports.handleDisconnect = function(client)
//Go trough all user that are still on the pad, and send them the USER_LEAVE message
for(i in pad2sessions[sessionPad])
{
- socketio.sockets.sockets[pad2sessions[sessionPad][i]].json.send(messageToTheOtherUsers);
+ var socket = socketio.sockets.sockets[pad2sessions[sessionPad][i]];
+ if(socket !== undefined){
+ socket.json.send(messageToTheOtherUsers);
+ }
+
}
});
}
@@ -738,9 +742,10 @@ function handleClientReady(client, message)
{
for(var i in pad2sessions[message.padId])
{
- if(sessioninfos[pad2sessions[message.padId][i]].author == author)
+ if(sessioninfos[pad2sessions[message.padId][i]] && sessioninfos[pad2sessions[message.padId][i]].author == author)
{
- socketio.sockets.sockets[pad2sessions[message.padId][i]].json.send({disconnect:"userdup"});
+ var socket = socketio.sockets.sockets[pad2sessions[message.padId][i]];
+ if(socket) socket.json.send({disconnect:"userdup"});
}
}
}
diff --git a/src/node/utils/tar.json b/src/node/utils/tar.json
index a905eb44..adb6e2b2 100644
--- a/src/node/utils/tar.json
+++ b/src/node/utils/tar.json
@@ -1,6 +1,7 @@
{
"pad.js": [
"jquery.js"
+ , "underscore.js"
, "security.js"
, "pad.js"
, "ace2_common.js"
@@ -25,6 +26,7 @@
]
, "timeslider.js": [
"jquery.js"
+ , "underscore.js"
, "security.js"
, "undo-xpopup.js"
, "json2.js"
@@ -51,6 +53,8 @@
]
, "ace2_inner.js": [
"ace2_common.js"
+ , "underscore.js"
+ , "rjquery.js"
, "AttributePoolFactory.js"
, "Changeset.js"
, "security.js"