From c1fea35c29fe6a19ae220e2f02d5cb4b49ae2b14 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 10 Nov 2010 10:49:16 +0000 Subject: [PATCH] * telling IE via X-UA-Compatible IE=edge never to use compatibility modes with old versions (if set eg. via group policy for whole intranet zone) --- phpgwapi/inc/class.egw_framework.inc.php | 29 +++++++++++++----------- phpgwapi/templates/default/head.tpl | 12 +++++----- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/phpgwapi/inc/class.egw_framework.inc.php b/phpgwapi/inc/class.egw_framework.inc.php index eea5fe34e1..c00351a79a 100644 --- a/phpgwapi/inc/class.egw_framework.inc.php +++ b/phpgwapi/inc/class.egw_framework.inc.php @@ -270,20 +270,23 @@ abstract class egw_framework { $lang_code = $GLOBALS['egw_info']['user']['preferences']['common']['lang']; } - //pngfix defaults to yes - if(!$GLOBALS['egw_info']['user']['preferences']['common']['disable_pngfix']) + // IE specific fixes + if (html::$user_agent == 'msie') { - $pngfix_src = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/js/pngfix.js'; - $pngfix =' - '; - } - // tell IE > 7 to use it's own mode, not old compatibility mode eg. IE=7 for IE8 - if (html::$user_agent == 'msie' && html::$ua_version > 7) - { - $pngfix .= "\n\t\t".''; + // tell IE to use it's own mode, not old compatibility modes (set eg. via group policy for all intranet sites) + // has to be before any other header tags, but meta and title!!! + $pngfix = ''."\n"; + + // pngfix for IE6 defaults to yes + if(!$GLOBALS['egw_info']['user']['preferences']['common']['disable_pngfix'] && html::$ua_version < 7) + { + $pngfix_src = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/js/pngfix.js'; + $pngfix .= ' + '; + } } if(!$GLOBALS['egw_info']['user']['preferences']['common']['disable_slider_effects']) diff --git a/phpgwapi/templates/default/head.tpl b/phpgwapi/templates/default/head.tpl index a68131d547..11ffd27e9f 100644 --- a/phpgwapi/templates/default/head.tpl +++ b/phpgwapi/templates/default/head.tpl @@ -3,12 +3,13 @@ {website_title} - - - - + + + + - + + {pngfix} {meta_robots} @@ -16,7 +17,6 @@ {slider_effects} {simple_show_hide} - {pngfix}