Commit 0fce6207 authored by tbrehm's avatar tbrehm

Fixed: FS#1521 - Script error on login page when using IE8

Switch to IE8 mode when IE9 is used.
parent bf47b513
......@@ -503,3 +503,14 @@ function delAdditionalTemplate(){
}
}
function getInternetExplorerVersion() {
var rv = -1; // Return value assumes failure.
if (navigator.appName == 'Microsoft Internet Explorer') {
var ua = navigator.userAgent;
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
if (re.exec(ua) != null)
rv = parseFloat(RegExp.$1);
}
return rv;
}
......@@ -4,6 +4,7 @@
<head>
<title><tmpl_var name="app_title"> <tmpl_var name="app_version"></title>
<meta http-equiv="Content-Type" content="text/html; charset=<tmpl_var name="html_content_encoding">"/>
<meta http-equiv="X-UA-Compatible" content="IE=8"/>
<link href="themes/default/css/central.css" rel="stylesheet" type="text/css"/>
<!--[if lte IE 7]>
<link href="themes/default/css/patches/central.css" rel="stylesheet" type="text/css" />
......@@ -60,7 +61,7 @@
<script type="text/javascript" src="js/uni-form/uni-form.jquery.js"></script>
<script language="JavaScript" type="text/javascript">
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
if(!is_chrome) {
if(!is_chrome && getInternetExplorerVersion() > 8.0) {
var style = document.createElement('style');
style.innerHTML = '#page_margins { min-width: 980px; max-width: 80%; background: #fff; display: table;}';
document.getElementsByTagName("head")[0].appendChild(style);
......
......@@ -4,7 +4,8 @@
<head>
<title><tmpl_var name="app_title"> <tmpl_var name="app_version"></title>
<meta http-equiv="Content-Type" content="text/html; charset=<tmpl_var name="html_content_encoding">"/>
<link href="themes/default/css/central.css" rel="stylesheet" type="text/css"/>
<meta http-equiv="X-UA-Compatible" content="IE=8"/>
<link href="themes/default/css/central.css" rel="stylesheet" type="text/css"/>
<!--[if lte IE 7]>
<link href="themes/default/css/patches/central.css" rel="stylesheet" type="text/css" />
<![endif]-->
......@@ -61,7 +62,7 @@
<script type="text/javascript" src="js/uni-form/uni-form.jquery.js"></script>
<script language="JavaScript" type="text/javascript">
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
if(!is_chrome) {
if(!is_chrome && getInternetExplorerVersion() > 8.0) {
var style = document.createElement('style');
style.innerHTML = '#page_margins { min-width: 980px; max-width: 80%; background: #fff; display: table;}';
document.getElementsByTagName("head")[0].appendChild(style);
......
......@@ -4,7 +4,8 @@
<head>
<title><tmpl_var name="app_title"> <tmpl_var name="app_version"></title>
<meta http-equiv="Content-Type" content="text/html; charset=<tmpl_var name="html_content_encoding">"/>
<link href="themes/default/css/central.css" rel="stylesheet" type="text/css"/>
<meta http-equiv="X-UA-Compatible" content="IE=8"/>
<link href="themes/default/css/central.css" rel="stylesheet" type="text/css"/>
<!--[if lte IE 7]>
<link href="themes/default/css/patches/central.css" rel="stylesheet" type="text/css" />
<![endif]-->
......@@ -61,7 +62,7 @@
<script type="text/javascript" src="js/uni-form/uni-form.jquery.js"></script>
<script language="JavaScript" type="text/javascript">
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
if(!is_chrome) {
if(!is_chrome && getInternetExplorerVersion() > 8.0) {
var style = document.createElement('style');
style.innerHTML = '#page_margins { min-width: 980px; max-width: 80%; background: #fff; display: table;}';
document.getElementsByTagName("head")[0].appendChild(style);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment