* Api: detect if framework data is missing for popups too and redirect to cd=popup to load it

This commit is contained in:
Ralf Becker
2020-10-14 17:31:17 +02:00
parent 4f1ce8da48
commit 175d94f3e3
2 changed files with 4 additions and 3 deletions

View File

@@ -130,10 +130,11 @@
// ignore SecurityError exception if top is different security context / cross-origin
}
// if framework not found, but requested to check for it, redirect to cd=yes to create it
if (typeof window.framework == 'undefined' && egw_script.getAttribute('data-check-framework') &&
if (typeof window.framework == 'undefined' &&
!window.location.search.match(/[&?]cd=/))
{
window.location.search += window.location.search ? "&cd=yes" : "?cd=yes";
window.location.search += (window.location.search ? "&" : "?")+
(egw_script.getAttribute('data-check-framework') ? "cd=yes" : "cd=popup");
}
}
try {