Author: abelevich
Date: 2008-08-07 13:04:14 -0400 (Thu, 07 Aug 2008)
New Revision: 9978
Modified:
trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js
Log:
https://jira.jboss.org/jira/browse/RF-3526
Modified:
trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js
===================================================================
---
trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js 2008-08-07
15:23:29 UTC (rev 9977)
+++
trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js 2008-08-07
17:04:14 UTC (rev 9978)
@@ -7,8 +7,8 @@
initialize: function(panelId, options) {
- this.FF = (RichFaces.navigatorType() == RichFaces.FF)?true:false;
- this.isIE = ((navigator.userAgent.toLowerCase().indexOf("msie")!=-1) ||
(navigator.userAgent.toLowerCase().indexOf("explorer")!=-1))?true:false;
+// this.FF = (RichFaces.navigatorType() == RichFaces.FF)?true:false;
+// this.isIE = ((navigator.userAgent.toLowerCase().indexOf("msie")!=-1) ||
(navigator.userAgent.toLowerCase().indexOf("explorer")!=-1))?true:false;
this.panel=$(panelId); //+"_p"
if (!this.panel) {
@@ -78,9 +78,13 @@
var h=0;
this.hclient=0;
for(var i=0; i<this.slides.length; i++) {
+ if (Richfaces.browser.isIE6) {
+ //
https://jira.jboss.org/jira/browse/RF-3526
+ var processItem = this.slides[i].item;
+ h+= (processItem.offsetHeight -(this.getBorderTB(processItem) +
this.getPaddingTB(processItem)));
+ } else {
h+=this.slides[i].item.offsetHeight;
-
-
+ }
}
this.hclient=h;
this.contentHight = this.panel.clientHeight-h;
@@ -89,6 +93,18 @@
return this.contentHight;
},
+ getBorderTB: function(el){
+ var top = parseInt(Element.getStyle(el, "border-top-width", 10));
+ var bottom = parseInt(Element.getStyle(el, "border-bottom-width", 10));
+ return (top + bottom);
+ },
+
+ getPaddingTB: function(el){
+ var top = parseInt(Element.getStyle(el, "padding-top-", 10));
+ var bottom = parseInt(Element.getStyle(el, "padding-bottom", 10));
+ return (top + bottom);
+ },
+
showSlide: function(slide) {
if (this.current) this.current.hideContent();