details:   https://code.openbravo.com/erp/devel/pi/rev/7b77a49f3024
changeset: 16453:7b77a49f3024
user:      David Baz Fayos <david.baz <at> openbravo.com>
date:      Tue May 08 23:16:09 2012 +0200
summary:   Related to issue 20207: Classic windows 'resizeArea' now works ok in 
IE9

diffstat:

 web/js/utils.js |  60 +++++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 48 insertions(+), 12 deletions(-)

diffs (105 lines):

diff -r 940dee23af43 -r 7b77a49f3024 web/js/utils.js
--- a/web/js/utils.js   Tue May 08 20:12:24 2012 +0200
+++ b/web/js/utils.js   Tue May 08 23:16:09 2012 +0200
@@ -4459,8 +4459,14 @@
   var mbottombut = document.getElementById("tdbottomButtons");
   var mbottom = document.getElementById("tdbottomSeparator");
   var body = document.getElementsByTagName("BODY");
-  var h = body[0].clientHeight;
-  var w = body[0].clientWidth;
+  var h, w;
+  if (isIE8Strict) {
+    h = window.innerHeight;
+    w = window.innerWidth;
+  } else {
+    h = body[0].clientHeight;
+    w = body[0].clientWidth;
+  }
   var name = window.navigator.userAgent;
   var mnuWidth = w - ((mleft?mleft.clientWidth:0) + 
(mleftSeparator?mleftSeparator.clientWidth:0) + (mright?mright.clientWidth:0)) 
- ((name.indexOf("MSIE")==-1)?2:0);
   var mnuHeight = h -((mtop?mtop.clientHeight:0) + 
(mtopToolbar?mtopToolbar.clientHeight:0) + (mtopTabs?mtopTabs.clientHeight:0) + 
(mbottom?mbottom.clientHeight:0) + (mbottombut?mbottombut.clientHeight:0)) - 
((name.indexOf("MSIE")==-1)?1:0);
@@ -4489,8 +4495,14 @@
   var mTopSeparator = document.getElementById("tdSeparator");
   var mTopNavigation = document.getElementById("tdNavigation");
   var body = document.getElementsByTagName("BODY");
-  var h = body[0].clientHeight;
-  var w = body[0].clientWidth;
+  var h, w;
+  if (isIE8Strict) {
+    h = window.innerHeight;
+    w = window.innerWidth;
+  } else {
+    h = body[0].clientHeight;
+    w = body[0].clientWidth;
+  }
   var name = window.navigator.userAgent;
 //  var mnuWidth = w - 18 - ((name.indexOf("MSIE")==-1)?2:0);
   var mnuHeight =  h -(mTopSeparator.clientHeight + 
mTopNavigation.clientHeight) - 2;
@@ -4514,8 +4526,14 @@
   var mVerSeparator = document.getElementById("tdVerSeparator");
   var mTopNavigation = document.getElementById("tdNavigation");
   var body = document.getElementsByTagName("BODY");
-  var h = body[0].clientHeight;
-  var w = body[0].clientWidth;
+  var h, w;
+  if (isIE8Strict) {
+    h = window.innerHeight;
+    w = window.innerWidth;
+  } else {
+    h = body[0].clientHeight;
+    w = body[0].clientWidth;
+  }
   var name = window.navigator.userAgent;
 //  mnu.style.width = w - 18 - ((name.indexOf("MSIE")==-1)?2:0);
   mnu.style.height = h -(mTopSeparator.clientHeight + 
mTopNavigation.clientHeight) - 2;
@@ -4538,8 +4556,14 @@
   var client_middle = document.getElementById("client_middle");
   var client_bottom = document.getElementById("client_bottom");
   var body = document.getElementsByTagName("BODY");
-  var h = body[0].clientHeight;
-  var w = body[0].clientWidth;
+  var h, w;
+  if (isIE8Strict) {
+    h = window.innerHeight;
+    w = window.innerWidth;
+  } else {
+    h = body[0].clientHeight;
+    w = body[0].clientWidth;
+  }
   var name = window.navigator.userAgent;
   var client_middleWidth = w;
   var client_middleHeight = h -((table_header?table_header.clientHeight:0) + 
(client_top?client_top.clientHeight:0) + 
(client_bottom?client_bottom.clientHeight:0)) - 
((name.indexOf("MSIE")==-1)?1:0);
@@ -4570,8 +4594,14 @@
   var client_middle = document.getElementById("client_middle");
   var client_bottom = document.getElementById("client_bottom");
   var body = document.getElementsByTagName("BODY");
-  var h = body[0].clientHeight;
-  var w = body[0].clientWidth;
+  var h, w;
+  if (isIE8Strict) {
+    h = window.innerHeight;
+    w = window.innerWidth;
+  } else {
+    h = body[0].clientHeight;
+    w = body[0].clientWidth;
+  }
   var name = window.navigator.appName;
   var client_middleWidth = w - 0;
   var client_middleHeight = h -((table_header?table_header.clientHeight:0) + 
(client_messagebox?client_messagebox.clientHeight:0) + 
(client_top?client_top.clientHeight:0) + 
(client_bottom?client_bottom.clientHeight:0)) - 
((name.indexOf("MSIE")==-1)?1:1);
@@ -4612,8 +4642,14 @@
   var mnu = document.getElementById("client");
   var table_header = document.getElementById("table_header");
   var body = document.getElementsByTagName("BODY");
-  var h = body[0].clientHeight;
-  var w = body[0].clientWidth;
+  var h, w;
+  if (isIE8Strict) {
+    h = window.innerHeight;
+    w = window.innerWidth;
+  } else {
+    h = body[0].clientHeight;
+    w = body[0].clientWidth;
+  }
   var name = window.navigator.appName;
   var mnuHeight = h -(table_header?table_header.clientHeight:0);
   var mnuWidth = w;

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to