Author: jmargaris
Date: Wed Feb 28 18:31:49 2007
New Revision: 513111
URL: http://svn.apache.org/viewvc?view=rev&rev=513111
Log:
still not working in IE6
Modified:
incubator/xap/trunk/codebase/src/xap/widgets/dojo/HorizontalPanel.js
incubator/xap/trunk/codebase/src/xap/widgets/dojo/VerticalPanel.js
Modified: incubator/xap/trunk/codebase/src/xap/widgets/dojo/HorizontalPanel.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/widgets/dojo/HorizontalPanel.js?view=diff&rev=513111&r1=513110&r2=513111
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/widgets/dojo/HorizontalPanel.js (original)
+++ incubator/xap/trunk/codebase/src/xap/widgets/dojo/HorizontalPanel.js Wed Feb 28 18:31:49 2007
@@ -134,19 +134,22 @@
this.centerTd.align = "center";
}
},
-
- onResized: function(){
- delete this._resizeTask;
- var children = this.children;
-
- for (var i = 0; i < children.length; i++) {
+
+ flex: function(){
+ var children = this.children;
+ for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.domNode.flex){
child.domNode.style.display='none';
}
}
-
- var contentWidth = dojo.style.getContentWidth(this.domNode);
+ dojo.lang.setTimeout(this, this.finishFlex, 0);
+ },
+
+ finishFlex:function(){
+ var children = this.children;
+
+ var contentWidth = dojo.style.getContentWidth(this.domNode);
var freeSpace = contentWidth;
for (var i = 0; i < children.length; i++) {
@@ -164,6 +167,23 @@
}
}
+ this.resizeChildren();
+
+ },
+
+
+ onResized: function(){
+ delete this._resizeTask;
+ if (this._totalFlex){
+ this.flex();
+ }
+ else{
+ this.resizeChildren();
+ }
+ },
+
+ resizeChildren: function(){
+ var children = this.children;
for (var i = 0; i<children.length;i++){
if(children[i].onResized){
children[i].onResized();
Modified: incubator/xap/trunk/codebase/src/xap/widgets/dojo/VerticalPanel.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/widgets/dojo/VerticalPanel.js?view=diff&rev=513111&r1=513110&r2=513111
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/widgets/dojo/VerticalPanel.js (original)
+++ incubator/xap/trunk/codebase/src/xap/widgets/dojo/VerticalPanel.js Wed Feb 28 18:31:49 2007
@@ -112,17 +112,20 @@
this._resizeTask = dojo.lang.setTimeout(this, this.onResized, 0);
}
},
-
- onResized: function(){
- delete this._resizeTask;
- var children = this.children;
-
- for (var i = 0; i < children.length; i++) {
+
+ flex: function(){
+ var children = this.children;
+ for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child.domNode.flex){
child.domNode.style.display='none';
}
}
+ dojo.lang.setTimeout(this, this.finishFlex, 0);
+ },
+
+ finishFlex: function(){
+ var children = this.children;
var contentHeight = dojo.style.getContentHeight(this.domNode);
var freeSpace = contentHeight;
@@ -141,7 +144,22 @@
child.domNode.style.display='';
}
}
-
+ this.resizeChildren();
+
+ },
+
+ onResized: function(){
+ delete this._resizeTask;
+ if (this._totalFlex){
+ this.flex();
+ }
+ else{
+ this.resizeChildren();
+ }
+ },
+
+ resizeChildren: function(){
+ var children = this.children;
for (var i = 0; i<children.length;i++){
if(children[i].onResized){
children[i].onResized();