From ccf99917d01a672a13f40d602f919a87e47020e1 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 10 Jul 2011 12:10:43 +0000 Subject: [PATCH] fixing the last fix, code was still needed ;-) and automatically hiding the location bar for mobile browsers --- .../templates/idots/class.idots_framework.inc.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/phpgwapi/templates/idots/class.idots_framework.inc.php b/phpgwapi/templates/idots/class.idots_framework.inc.php index dff9d18371..9385bc09b6 100644 --- a/phpgwapi/templates/idots/class.idots_framework.inc.php +++ b/phpgwapi/templates/idots/class.idots_framework.inc.php @@ -104,6 +104,8 @@ 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);'); } $this->tpl->set_var($this->_get_header()); @@ -507,12 +509,17 @@ class idots_framework extends egw_framework $this->tpl->set_var('upper_tabs',''); } - if (!($max_icons=$GLOBALS['egw_info']['user']['preferences']['common']['max_icons'])) + if (html::$ua_mobile) + { + $max_icons = 0; + $this->tpl->set_var('app_icons',''); + } + elseif (!($max_icons=$GLOBALS['egw_info']['user']['preferences']['common']['max_icons'])) { $max_icons = 30; } - if($GLOBALS['egw_info']['user']['preferences']['common']['start_and_logout_icons'] == 'no') + if($GLOBALS['egw_info']['user']['preferences']['common']['start_and_logout_icons'] == 'no' && !html::$ua_mobile) { $tdwidth = 100 / $max_icons; }