Browse Source

[core] Allow IE9 compatibility mode and blocks IE7 and IE8 document modes

Enrico Berti 10 years ago
parent
commit
fbfeaa4c33
1 changed files with 8 additions and 1 deletions
  1. 8 1
      desktop/core/src/desktop/templates/common_header.mako

+ 8 - 1
desktop/core/src/desktop/templates/common_header.mako

@@ -145,7 +145,9 @@ from django.utils.translation import ugettext as _
 
   <!--[if lt IE 9]>
   <script type="text/javascript">
-    location.href = "${ url('desktop.views.unsupported') }";
+    if (document.documentMode && document.documentMode < 9){
+      location.href = "${ url('desktop.views.unsupported') }";
+    }
   </script>
   <![endif]-->
 
@@ -157,6 +159,11 @@ from django.utils.translation import ugettext as _
         location.href = "${ url('desktop.views.unsupported') }";
       }
     }
+
+    // check for IE document modes
+    if (document.documentMode && document.documentMode < 9){
+      location.href = "${ url('desktop.views.unsupported') }";
+    }
   </script>
 
   <script src="${ static('desktop/js/hue.utils.js') }"></script>