[richfaces-svn-commits] JBoss Rich Faces SVN: r1287 - in trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI: controls/grid and 1 other directory.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Mon Jun 25 05:39:36 EDT 2007


Author: dmorozov
Date: 2007-06-25 05:39:36 -0400 (Mon, 25 Jun 2007)
New Revision: 1287

Modified:
   trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/SplashBox.js
   trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
Log:
Fix problem with "Loading..." label first showing

Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/SplashBox.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/SplashBox.js	2007-06-25 09:39:06 UTC (rev 1286)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/SplashBox.js	2007-06-25 09:39:36 UTC (rev 1287)
@@ -22,10 +22,11 @@
 
 	initialize: function(text, parentElement, zIndex, supressSplash) {
 		ClientUI.common.box.SplashBox.parentClass.constructor().call(this, null, parentElement);
+		this.moveTo(-1000, -1000);
 		this.zIndex = zIndex || 500;
 		this.supressSplash = supressSplash || false;
+		this.createControl(text);
 		this.hide();
-		this.createControl(text);
 	},
 	createControl: function(text) {
 		this.element.setStyle({zIndex: this.zIndex});
@@ -51,7 +52,7 @@
 			this.div.setHeight(this.getHeight());
 			this.div.show();
 		}
-		
+
 		this.text = new ClientUI.common.box.Box(text, this.getElement());
 		this.text.setParent(this.getElement());
 		this.text.getElement().setStyle({zIndex: this.zIndex + 100});
@@ -59,10 +60,13 @@
 			this.text.getElement().innerHTML = "<font size='4' color='white'>Loading...</font>";
 		this.text.makeAbsolute();
 		this.text.show();
+		
 	},
 	setSize: function(width, height) {
 		this.setWidth(width);
 		this.setHeight(height);
+		this.containerWidth = width;
+		this.containerHeight = height;
 	},
 	setImage: function(image) {
 		if(!this.img) {
@@ -73,8 +77,8 @@
 		this.text.hide();
 	},
 	updateLayout: function() {
-		var width = this.getWidth();
-		var height = this.getHeight();
+		var width = this.containerWidth||this.getWidth();
+		var height = this.containerHeight||this.getHeight();
 
 		this.frame.setWidth(width);
 		this.frame.setHeight(height);

Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js	2007-06-25 09:39:06 UTC (rev 1286)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js	2007-06-25 09:39:36 UTC (rev 1287)
@@ -484,6 +484,7 @@
 		this.splash.setSize(this.scrollBox.getViewportWidth(), this.scrollBox.getViewportHeight());
 		this.splash.updateLayout();
 		this.splash.show();
+		this.splash.updateLayout();
 	},
 	forceReRender: function() {
 		if(ClientUILib.isIE && !ClientUILib.isIE7) {




More information about the richfaces-svn-commits mailing list