mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
* Api: detect if framework data is missing for popups too and redirect to cd=popup to load it
This commit is contained in:
parent
4f1ce8da48
commit
175d94f3e3
@ -130,10 +130,11 @@
|
|||||||
// ignore SecurityError exception if top is different security context / cross-origin
|
// 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 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.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 {
|
try {
|
||||||
|
@ -1039,7 +1039,7 @@ abstract class Framework extends Framework\Extra
|
|||||||
}
|
}
|
||||||
// add configuration, link-registry, images, user-data and -perferences for non-popup windows
|
// add configuration, link-registry, images, user-data and -perferences for non-popup windows
|
||||||
// specifying etag in url to force reload, as we send expires header
|
// specifying etag in url to force reload, as we send expires header
|
||||||
if ($GLOBALS['egw_info']['flags']['js_link_registry'])
|
if ($GLOBALS['egw_info']['flags']['js_link_registry'] || isset($_GET['cd']) && $_GET['cd'] === 'popup')
|
||||||
{
|
{
|
||||||
self::includeJS('/api/config.php', array(
|
self::includeJS('/api/config.php', array(
|
||||||
'etag' => md5(json_encode(Config::clientConfigs()).Link::json_registry()),
|
'etag' => md5(json_encode(Config::clientConfigs()).Link::json_registry()),
|
||||||
|
Loading…
Reference in New Issue
Block a user