use `parent.parent` instead of `top` in `collab_client.js`, since `top` breaks embedding when a pad is embedded (same origin policy)

pull/1722/head
mluto 2013-04-08 22:58:34 +02:00
parent f503f28b08
commit dfc49df52d
1 changed files with 4 additions and 4 deletions

View File

@ -295,7 +295,7 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
if (newRev != (oldRev + 1))
{
top.console.warn("bad message revision on NEW_CHANGES: " + newRev + " not " + (oldRev + 1));
parent.parent.console.warn("bad message revision on NEW_CHANGES: " + newRev + " not " + (oldRev + 1));
// setChannelState("DISCONNECTED", "badmessage_newchanges");
return;
}
@ -305,7 +305,7 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
if (newRev != (rev + 1))
{
top.console.warn("bad message revision on NEW_CHANGES: " + newRev + " not " + (rev + 1));
parent.parent.console.warn("bad message revision on NEW_CHANGES: " + newRev + " not " + (rev + 1));
// setChannelState("DISCONNECTED", "badmessage_newchanges");
return;
}
@ -319,7 +319,7 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
{
if (newRev != (msgQueue[msgQueue.length - 1].newRev + 1))
{
top.console.warn("bad message revision on ACCEPT_COMMIT: " + newRev + " not " + (msgQueue[msgQueue.length - 1][0] + 1));
parent.parent.console.warn("bad message revision on ACCEPT_COMMIT: " + newRev + " not " + (msgQueue[msgQueue.length - 1][0] + 1));
// setChannelState("DISCONNECTED", "badmessage_acceptcommit");
return;
}
@ -329,7 +329,7 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
if (newRev != (rev + 1))
{
top.console.warn("bad message revision on ACCEPT_COMMIT: " + newRev + " not " + (rev + 1));
parent.parent.console.warn("bad message revision on ACCEPT_COMMIT: " + newRev + " not " + (rev + 1));
// setChannelState("DISCONNECTED", "badmessage_acceptcommit");
return;
}