mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-24 15:49:06 +01:00
fixed a couple of problems with automatic switch to idots template from mobile browsers: csp-error, wrong icons
This commit is contained in:
parent
f45c1e7d53
commit
11d77f3dab
@ -854,7 +854,7 @@ class common
|
||||
{
|
||||
if (is_null($template_set))
|
||||
{
|
||||
$template_set = $GLOBALS['egw_info']['user']['preferences']['common']['template_set'];
|
||||
$template_set = $GLOBALS['egw_info']['server']['template_set'];
|
||||
}
|
||||
if (is_null($svg))
|
||||
{
|
||||
|
@ -1144,8 +1144,8 @@ if ($app == 'home') continue;
|
||||
'etag' => md5(json_encode(config::clientConfigs()).egw_link::json_registry()),
|
||||
));
|
||||
self::validate_file('/phpgwapi/images.php', array(
|
||||
'template' => $GLOBALS['egw_info']['user']['preferences']['common']['template_set'],
|
||||
'etag' => md5(json_encode(common::image_map($GLOBALS['egw_info']['user']['preferences']['common']['template_set']))),
|
||||
'template' => $GLOBALS['egw_info']['server']['template_set'],
|
||||
'etag' => md5(json_encode(common::image_map($GLOBALS['egw_info']['server']['template_set']))),
|
||||
'svg' => 0, // always load non-svg image map
|
||||
));
|
||||
self::validate_file('/phpgwapi/user.php', array(
|
||||
|
@ -255,6 +255,11 @@
|
||||
{
|
||||
egw(window).message(JSON.parse(egw_script.getAttribute('data-message')));
|
||||
}
|
||||
// hide location bar for mobile browsers
|
||||
if (egw_script.getAttribute('data-mobile'))
|
||||
{
|
||||
window.scrollTo(0, 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -99,7 +99,6 @@ class idots_framework extends egw_framework
|
||||
|
||||
// the instanciation of the template has to be here and not in the constructor,
|
||||
// as the old Template class has problems if restored from the session (php-restore)
|
||||
if (!is_object($this->tpl)) ;
|
||||
$this->tpl = new Template(EGW_TEMPLATE_DIR,'keep');
|
||||
$this->tpl->set_file(array('_head' => 'head.tpl'));
|
||||
$this->tpl->set_block('_head','head');
|
||||
@ -107,8 +106,7 @@ class idots_framework extends egw_framework
|
||||
if (html::$ua_mobile)
|
||||
{
|
||||
self::$css_include_files[] = '/phpgwapi/templates/idots/mobile.css';
|
||||
// hide location bar
|
||||
egw_framework::set_onload('window.setTimeout(function(){window.scrollTo(0, 1);}, 100);');
|
||||
$extra['mobile'] = true;
|
||||
}
|
||||
|
||||
// load idots specific javascript files, if we are not in login or logout
|
||||
|
Loading…
Reference in New Issue
Block a user