Merge branch 'soon'

pull/1/head
yflory 7 years ago
commit c713b44a4a

@ -7,7 +7,7 @@ define([
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 handlers = {};
var queries = {};
@ -130,7 +130,7 @@ define([
console.log(msg);
}
});
if (window !== window.top) {
if (isSandbox) {
// we're in the sandbox
otherWindow = ow;
cb(chan);

@ -230,31 +230,31 @@ define([
$userAdmin.find('a.logout').click(function () {
Common.logout(function () {
window.top.location = origin+'/';
window.parent.location = origin+'/';
});
});
$userAdmin.find('a.settings').click(function () {
if (padType) {
window.open(origin+'/settings/');
} else {
window.top.location = origin+'/settings/';
window.parent.location = origin+'/settings/';
}
});
$userAdmin.find('a.profile').click(function () {
if (padType) {
window.open(origin+'/profile/');
} else {
window.top.location = origin+'/profile/';
window.parent.location = origin+'/profile/';
}
});
$userAdmin.find('a.login').click(function () {
Common.setLoginRedirect(function () {
window.top.location = origin+'/login/';
window.parent.location = origin+'/login/';
});
});
$userAdmin.find('a.register').click(function () {
Common.setLoginRedirect(function () {
window.top.location = origin+'/register/';
window.parent.location = origin+'/register/';
});
});

@ -298,7 +298,7 @@ define([
Object.freeze(funcs);
return { create: function (cb) {
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....
}).nThen(function () {
ctx.metadataMgr = MetadataMgr.create(ctx.sframeChan);

@ -611,7 +611,7 @@ define([
window.open(href);
return;
}
window.top.location = href;
window.parent.location = href;
};
var onContext = function (e) { e.stopPropagation(); };

Loading…
Cancel
Save