Merge branch 'soon'
This commit is contained in:
commit
c713b44a4a
@ -7,7 +7,7 @@ define([
|
|||||||
return Math.random().toString(16).replace('0.', '') + Math.random().toString(16).replace('0.', '');
|
return Math.random().toString(16).replace('0.', '') + Math.random().toString(16).replace('0.', '');
|
||||||
};
|
};
|
||||||
|
|
||||||
var create = function (ow, cb) {
|
var create = function (ow, cb, isSandbox) {
|
||||||
var otherWindow;
|
var otherWindow;
|
||||||
var handlers = {};
|
var handlers = {};
|
||||||
var queries = {};
|
var queries = {};
|
||||||
@ -130,7 +130,7 @@ define([
|
|||||||
console.log(msg);
|
console.log(msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (window !== window.top) {
|
if (isSandbox) {
|
||||||
// we're in the sandbox
|
// we're in the sandbox
|
||||||
otherWindow = ow;
|
otherWindow = ow;
|
||||||
cb(chan);
|
cb(chan);
|
||||||
|
|||||||
@ -230,31 +230,31 @@ define([
|
|||||||
|
|
||||||
$userAdmin.find('a.logout').click(function () {
|
$userAdmin.find('a.logout').click(function () {
|
||||||
Common.logout(function () {
|
Common.logout(function () {
|
||||||
window.top.location = origin+'/';
|
window.parent.location = origin+'/';
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$userAdmin.find('a.settings').click(function () {
|
$userAdmin.find('a.settings').click(function () {
|
||||||
if (padType) {
|
if (padType) {
|
||||||
window.open(origin+'/settings/');
|
window.open(origin+'/settings/');
|
||||||
} else {
|
} else {
|
||||||
window.top.location = origin+'/settings/';
|
window.parent.location = origin+'/settings/';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$userAdmin.find('a.profile').click(function () {
|
$userAdmin.find('a.profile').click(function () {
|
||||||
if (padType) {
|
if (padType) {
|
||||||
window.open(origin+'/profile/');
|
window.open(origin+'/profile/');
|
||||||
} else {
|
} else {
|
||||||
window.top.location = origin+'/profile/';
|
window.parent.location = origin+'/profile/';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$userAdmin.find('a.login').click(function () {
|
$userAdmin.find('a.login').click(function () {
|
||||||
Common.setLoginRedirect(function () {
|
Common.setLoginRedirect(function () {
|
||||||
window.top.location = origin+'/login/';
|
window.parent.location = origin+'/login/';
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$userAdmin.find('a.register').click(function () {
|
$userAdmin.find('a.register').click(function () {
|
||||||
Common.setLoginRedirect(function () {
|
Common.setLoginRedirect(function () {
|
||||||
window.top.location = origin+'/register/';
|
window.parent.location = origin+'/register/';
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -298,7 +298,7 @@ define([
|
|||||||
Object.freeze(funcs);
|
Object.freeze(funcs);
|
||||||
return { create: function (cb) {
|
return { create: function (cb) {
|
||||||
nThen(function (waitFor) {
|
nThen(function (waitFor) {
|
||||||
SFrameChannel.create(window.top, waitFor(function (sfc) { ctx.sframeChan = sfc; }));
|
SFrameChannel.create(window.parent, waitFor(function (sfc) { ctx.sframeChan = sfc; }), true);
|
||||||
// CpNfInner.start() should be here....
|
// CpNfInner.start() should be here....
|
||||||
}).nThen(function () {
|
}).nThen(function () {
|
||||||
ctx.metadataMgr = MetadataMgr.create(ctx.sframeChan);
|
ctx.metadataMgr = MetadataMgr.create(ctx.sframeChan);
|
||||||
|
|||||||
@ -611,7 +611,7 @@ define([
|
|||||||
window.open(href);
|
window.open(href);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
window.top.location = href;
|
window.parent.location = href;
|
||||||
};
|
};
|
||||||
|
|
||||||
var onContext = function (e) { e.stopPropagation(); };
|
var onContext = function (e) { e.stopPropagation(); };
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user