Related to issue 20207: Deprecated (and not used) classic menu now opens ok using IE9 and HTML5
authorDavid Baz Fayos <david.baz@openbravo.com>
Thu, 10 May 2012 15:38:32 +0200
changeset 16486 27f29f685bb4
parent 16485 d993d583464c
child 16487 ebd3b12bc36c
Related to issue 20207: Deprecated (and not used) classic menu now opens ok using IE9 and HTML5
src/org/openbravo/erpCommon/utility/VerticalMenu.html
src/org/openbravo/erpCommon/utility/VerticalMenuLoading.html
--- a/src/org/openbravo/erpCommon/utility/VerticalMenu.html	Thu May 10 15:19:17 2012 +0200
+++ b/src/org/openbravo/erpCommon/utility/VerticalMenu.html	Thu May 10 15:38:32 2012 +0200
@@ -43,8 +43,14 @@
         var mtop2 = document.getElementById("MenuTop2");
         var mbottom = document.getElementById("MenuBottom");
         var body = document.getElementsByTagName("BODY");
-        var h = body[0].clientHeight;
-        var w = body[0].clientWidth;
+        var h, w;
+        if (isIE9Strict) {
+          h = window.innerHeight;
+          w = window.innerWidth;
+        } else {
+          h = body[0].clientHeight;
+          w = body[0].clientWidth;
+        }
         var name = window.navigator.appName;
         var mnuWidth = w - (mleft.clientWidth + mright.clientWidth) - ((name.indexOf("Microsoft")==-1)?2:0);
         var mnuHeight = h -(mtop.clientHeight + mtop2.clientHeight + mbottom.clientHeight) - ((name.indexOf("Microsoft")==-1)?2:0);
--- a/src/org/openbravo/erpCommon/utility/VerticalMenuLoading.html	Thu May 10 15:19:17 2012 +0200
+++ b/src/org/openbravo/erpCommon/utility/VerticalMenuLoading.html	Thu May 10 15:38:32 2012 +0200
@@ -44,8 +44,14 @@
         var mtop2 = document.getElementById("MenuTop2");
         var mbottom = document.getElementById("MenuBottom");
         var body = document.getElementsByTagName("BODY");
-        var h = body[0].clientHeight;
-        var w = body[0].clientWidth;
+        var h, w;
+        if (isIE9Strict) {
+          h = window.innerHeight;
+          w = window.innerWidth;
+        } else {
+          h = body[0].clientHeight;
+          w = body[0].clientWidth;
+        }
         var name = window.navigator.appName;
         mnu.style.height = h -(mtop.clientHeight + mtop2.clientHeight + mbottom.clientHeight) - ((name.indexOf("Microsoft")==-1)?2:0);
         mnu.style.width = w - (mleft.clientWidth + mright.clientWidth) - ((name.indexOf("Microsoft")==-1)?2:0);