From seam-commits at lists.jboss.org Thu Aug 27 08:35:45 2009
Content-Type: multipart/mixed; boundary="===============3509014122760540901=="
MIME-Version: 1.0
From: seam-commits at lists.jboss.org
To: seam-commits at lists.jboss.org
Subject: [seam-commits] Seam SVN: r11437 - in sandbox/trunk/modules/xwidgets:
src/main/javascript and 1 other directory.
Date: Thu, 27 Aug 2009 08:35:45 -0400
Message-ID: <200908271235.n7RCZjt3030009@svn01.web.mwc.hst.phx2.redhat.com>
--===============3509014122760540901==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: shane.bryzak(a)jboss.com
Date: 2009-08-27 08:35:44 -0400 (Thu, 27 Aug 2009)
New Revision: 11437
Modified:
sandbox/trunk/modules/xwidgets/examples/panels/index.html
sandbox/trunk/modules/xwidgets/examples/panels/panels.xw
sandbox/trunk/modules/xwidgets/src/main/javascript/xw.js
Log:
fixed display issues in safari
Modified: sandbox/trunk/modules/xwidgets/examples/panels/index.html
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- sandbox/trunk/modules/xwidgets/examples/panels/index.html 2009-08-26 23=
:29:17 UTC (rev 11436)
+++ sandbox/trunk/modules/xwidgets/examples/panels/index.html 2009-08-27 12=
:35:44 UTC (rev 11437)
@@ -1,6 +1,6 @@
- Panel Examples
+ Panel Example
=
=
Modified: sandbox/trunk/modules/xwidgets/examples/panels/panels.xw
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- sandbox/trunk/modules/xwidgets/examples/panels/panels.xw 2009-08-26 23:=
29:17 UTC (rev 11436)
+++ sandbox/trunk/modules/xwidgets/examples/panels/panels.xw 2009-08-27 12:=
35:44 UTC (rev 11437)
@@ -15,7 +15,7 @@
=
-
+
Modified: sandbox/trunk/modules/xwidgets/src/main/javascript/xw.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- sandbox/trunk/modules/xwidgets/src/main/javascript/xw.js 2009-08-26 23:=
29:17 UTC (rev 11436)
+++ sandbox/trunk/modules/xwidgets/src/main/javascript/xw.js 2009-08-27 12:=
35:44 UTC (rev 11437)
@@ -133,6 +133,36 @@
return strValue;
}
=
+xw.Sys.getBorder =3D function(control)
+{
+ var border =3D {};
+ if (window.navigator.userAgent.indexOf('Safari') =3D=3D -1)
+ {
+ if (control.currentStyle)
+ {
+ border.top =3D parseInt(control.currentStyle.borderTopWidth);
+ border.right =3D parseInt(control.currentStyle.borderRightWidth);
+ border.bottom =3D parseInt(control.currentStyle.borderBottomWidth);
+ border.left =3D parseInt(control.currentStyle.borderLeftWidth);
+ } =
+ else =
+ {
+ border.top =3D parseInt(getComputedStyle(control,null).getPropertyVa=
lue('border-top-width'));
+ border.right =3D parseInt(getComputedStyle(control,null).getProperty=
Value('border-right-width'));
+ border.bottom =3D parseInt(getComputedStyle(control,null).getPropert=
yValue('border-bottom-width'));
+ border.left =3D parseInt(getComputedStyle(control,null).getPropertyV=
alue('border-left-width'));
+ }
+ } =
+ else =
+ {
+ border.top =3D parseInt(control.style.getPropertyValue('border-top-wid=
th'));
+ border.right =3D parseInt(control.style.getPropertyValue('border-right=
-width'));
+ border.bottom =3D parseInt(control.style.getPropertyValue('border-bott=
om-width'));
+ border.left =3D parseInt(control.style.getPropertyValue('border-left-w=
idth'));
+ }
+ return border;
+}
+
/**
* A Map implementation
*/
@@ -526,14 +556,10 @@
=
for (var i in this.style) control.style[i] =3D this.style[i]; =
=
=
- var hWidth =3D parseInt(xw.Sys.getStyle(control, "border-left-width"))=
+
- parseInt(xw.Sys.getStyle(control, "border-right-width"));
- var vWidth =3D parseInt(xw.Sys.getStyle(control, "border-top-width")) +
- parseInt(xw.Sys.getStyle(control, "border-bottom-width"));
+ var b =3D xw.Sys.getBorder(control);
=
- if (this.height !=3D null) control.style.height =3D this.height - vWid=
th;
- if (this.width !=3D null) control.style.width =3D this.width - hWidth;
-
+ if (this.height !=3D null) control.style.height =3D (this.height - b.t=
op - b.bottom) + "px";
+ if (this.width !=3D null) control.style.width =3D (this.width - b.left=
- b.right) + "px";
}
}
=
--===============3509014122760540901==--