[richfaces-svn-commits] JBoss Rich Faces SVN: r5135 - in branches/3.1.x/ui/scrollableDataTable: src/main/javascript/ClientUI/common/box and 4 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Fri Jan 4 08:34:10 EST 2008


Author: konstantin.mishin
Date: 2008-01-04 08:34:10 -0500 (Fri, 04 Jan 2008)
New Revision: 5135

Removed:
   branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/SplashBox.js
Modified:
   branches/3.1.x/ui/scrollableDataTable/generatescript.xml
   branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js
   branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
   branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js
   branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
   branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/VLayoutManager.js
   branches/3.1.x/ui/scrollableDataTable/src/main/resources/org/richfaces/renderkit/html/css/scrollable-data-table.xcss
   branches/3.1.x/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx
Log:
PS-137

Modified: branches/3.1.x/ui/scrollableDataTable/generatescript.xml
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/generatescript.xml	2008-01-04 12:40:06 UTC (rev 5134)
+++ branches/3.1.x/ui/scrollableDataTable/generatescript.xml	2008-01-04 13:34:10 UTC (rev 5135)
@@ -36,7 +36,6 @@
 						<file name="${resources-dir}/ClientUI/layouts/VLayoutManager.js"/>
 						<file name="${resources-dir}/ClientUI/layouts/GridLayoutManager.js"/>
 						<file name="${resources-dir}/ClientUI/controls/grid/GridHeader.js"/>
-						<file name="${resources-dir}/ClientUI/common/box/SplashBox.js"/>
 						<file name="${resources-dir}/ClientUI/controls/grid/DataCash.js"/>
 						<file name="${resources-dir}/ClientUI/controls/grid/GridBody.js"/>
 						<file name="${resources-dir}/ClientUI/controls/grid/GridFooter.js"/>
@@ -69,7 +68,6 @@
 					<file name="/ClientUI/layouts/VLayoutManager.js"/>
 					<file name="/ClientUI/layouts/GridLayoutManager.js"/>
 					<file name="/ClientUI/controls/grid/GridHeader.js"/>
-					<file name="/ClientUI/common/box/SplashBox.js"/>
 					<file name="/ClientUI/controls/grid/DataCash.js"/>
 					<file name="/ClientUI/controls/grid/GridBody.js"/>
 					<file name="/ClientUI/controls/grid/GridFooter.js"/>

Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js	2008-01-04 12:40:06 UTC (rev 5134)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js	2008-01-04 13:34:10 UTC (rev 5135)
@@ -50,12 +50,6 @@
 		if(!dontUpdateStyles) {
 	      	this.element.setStyle({overflow: 'hidden'});
 	      	this.element.setStyle({whiteSpace: 'nowrap'});
-	      	
-			// if the element isn't positioned, make it relative
-		    var position = this.element.getStyle('position');
-		    if(position != 'absolute' && position != 'fixed'){
-		        this.element.setStyle({position: 'relative'});
-		    }			
 		}
 	},
 	

Deleted: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/SplashBox.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/SplashBox.js	2008-01-04 12:40:06 UTC (rev 5134)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/SplashBox.js	2008-01-04 13:34:10 UTC (rev 5135)
@@ -1,95 +0,0 @@
-/**
- * InlineBox.js		Date created: 6.04.2007
- * Copyright (c) 2007 Exadel Inc.
- * @author Denis Morozov <dmorozov at exadel.com>
- */
-ClientUILib.declarePackage("ClientUI.common.box.SplashBox");
-
-ClientUILib.requireClass("ClientUI.common.box.Box");
-ClientUILib.requireClass("ClientUI.common.box.Substrate");
-
-/**
- * Base class that wrap work with inline blocks like span
- */
-ClientUI.common.box.SplashBox = Class.create(ClientUI.common.box.Box, {
-
-	initialize: function($super, text, parentElement, zIndex, supressSplash) {
-		$super(null, parentElement);
-		this.moveTo(-1000, -1000);
-		this.zIndex = zIndex || 500;
-		this.supressSplash = supressSplash || false;
-		this.createControl(text);
-		this.hide();
-	},
-	createControl: function(text) {
-		this.element.setStyle({zIndex: this.zIndex});
-		this.makeAbsolute();
-		
-		this.frame = new ClientUI.common.box.Substrate(null, this.getElement());
-		this.frame.getElement().setStyle({zIndex: this.zIndex + 1});
-		this.frame.getElement().setStyle({backgroundColor: "#FFFFFF"});
-		this.frame.getElement().setStyle({border: "medium none"});
-		this.frame.getElement().setStyle({opacity: "0"});
-		this.frame.moveTo(0, 0);
-		this.frame.setWidth(this.getWidth());
-		this.frame.setHeight(this.getHeight());
-		
-		if(!this.supressSplash) {			
-			this.div = new ClientUI.common.box.Box(null, this.getElement());
-			this.div.getElement().setStyle({zIndex: this.zIndex + 2});
-			this.div.getElement().setStyle({backgroundColor: "#000000"});
-			this.div.getElement().setStyle({opacity: "0.6"});
-			this.div.makeAbsolute();
-			this.div.moveTo(0, 0);
-			this.div.setWidth(this.getWidth());
-			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});
-		if(!text)
-			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) {
-			this.img = new ClientUI.common.box.Box($(document.createElement("img")), this.div.getElement());
-			this.img.makeAbsolute();
-		}		
-		this.img.getElement().src = image;
-		this.text.hide();
-	},
-	updateLayout: function() {
-		var width = this.containerWidth||this.getWidth();
-		var height = this.containerHeight||this.getHeight();
-
-		this.frame.setWidth(width);
-		this.frame.setHeight(height);
-		
-		if(!this.supressSplash) {
-			this.div.setWidth(width);
-			this.div.setHeight(height);		
-		}
-		
-		if(this.img) {
-			var x = width/2 - this.img.getWidth()/2;
-			var y = height/2 - this.img.getHeight()/2;		
-			this.img.moveTo(x, y);
-		}
-		else {
-			var x = width/2 - this.text.getWidth()/2;
-			var y = height/2 - this.text.getHeight()/2;		
-			this.text.moveTo(x, y);
-		}
-	}
-});

Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js	2008-01-04 12:40:06 UTC (rev 5134)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js	2008-01-04 13:34:10 UTC (rev 5135)
@@ -94,10 +94,8 @@
 		}
 
 		this.contentBox = new ClientUI.common.box.Box(normal);
-		this.contentBox.makeAbsolute();
 		Event.observe(this.contentBox.getElement(), 'keypress', this.synchronizeScroll.bindAsEventListener(this));
 		this.frozenContentBox = new ClientUI.common.box.Box(frozen);
-		this.frozenContentBox.makeAbsolute();
 		
 		this.helpObject1 = new ClientUI.common.box.Box(this.gridId + ":nho", this.contentBox.getElement());
 		this.helpObject2 = new ClientUI.common.box.Box(this.gridId + ":fho", this.frozenContentBox.getElement());
@@ -231,7 +229,7 @@
 		this.container.setHeight(height - fixH);
 		
 		this.defaultRowHeight = this._calcDefaultRowHeight();
-		this.sizeBox.hide();
+		this.scrollBox.hide();
 		this.sizeBox.setHeight(this.defaultRowHeight * this.grid.dataModel.getCount() + fixH);
 		this.helpObject1.moveToY(this.sizeBox.getHeight()+ this.defaultRowHeight + 5);
 		this.helpObject2.moveToY(this.sizeBox.getHeight()+ this.defaultRowHeight + 5);
@@ -241,7 +239,7 @@
 		if(height > 0) {
 			this.adjustDataPosition(this.currentPos);	
 		}
-		this.sizeBox.show();
+		this.scrollBox.show();
 		var viewWidth = this.scrollBox.getViewportWidth();
 		this.container.setWidth(viewWidth);
 		

Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js	2008-01-04 12:40:06 UTC (rev 5134)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js	2008-01-04 13:34:10 UTC (rev 5135)
@@ -67,10 +67,8 @@
 			throw(errMsg);
 		}
 		this.contentBox = new ClientUI.common.box.Box(normal);
-		this.contentBox.makeAbsolute();
 		this.frozenContentBox = new ClientUI.common.box.Box(frozen);
-		this.frozenContentBox.makeAbsolute();
-
+		
 		// create row template
 		var ch = this.contentBox.getElement().firstChild;
 		while(ch) {

Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js	2008-01-04 12:40:06 UTC (rev 5134)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js	2008-01-04 13:34:10 UTC (rev 5135)
@@ -83,10 +83,8 @@
 			throw(errMsg);
 		}
 		this.contentBox = new ClientUI.common.box.Box(normal);
-		this.contentBox.makeAbsolute();
 		this.frozenContentBox = new ClientUI.common.box.Box(frozen);
-		this.frozenContentBox.makeAbsolute();
-
+		
 		// create row template
 		var ch = this.contentBox.getElement().firstChild;
 		while(ch) {

Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/VLayoutManager.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/VLayoutManager.js	2008-01-04 12:40:06 UTC (rev 5134)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/VLayoutManager.js	2008-01-04 13:34:10 UTC (rev 5135)
@@ -23,10 +23,6 @@
 ClientUI.layouts.VLayoutManager = Class.create(ClientUI.layouts.LayoutManager, {	
 	initialize: function($super, element, parentElement, config) {
 		$super(element, parentElement);		
-		if(!element || !element.id) {
-			this.element.id = "ClientUI_VLayoutManager" + ClientUI_layouts_VLayoutManager_idGenerator++;
-		}
-
 		this.registerEvents();
 	},
 	registerEvents: function($super) {

Modified: branches/3.1.x/ui/scrollableDataTable/src/main/resources/org/richfaces/renderkit/html/css/scrollable-data-table.xcss
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/resources/org/richfaces/renderkit/html/css/scrollable-data-table.xcss	2008-01-04 12:40:06 UTC (rev 5134)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/resources/org/richfaces/renderkit/html/css/scrollable-data-table.xcss	2008-01-04 13:34:10 UTC (rev 5135)
@@ -229,7 +229,8 @@
 		
 		.dr-sdt-tmplbox {
 		 	display: block;
-		        float:left;
+		    float:left;
+		    position: absolute;
 		}
 		
 		.dr-sdt-inlinebox {

Modified: branches/3.1.x/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx	2008-01-04 12:40:06 UTC (rev 5134)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx	2008-01-04 13:34:10 UTC (rev 5135)
@@ -85,7 +85,7 @@
 			</jsp:scriptlet>
 			<tr>
 				<td style="height: 100%;">
-					<div id="#{clientId}:c" style="height: 100%;">
+					<div id="#{clientId}:c" style="height: 100%; position: relative;">
 						<div id="#{clientId}:cs" class="dr-sdt-hsplit" style="display: none;"/>
 						<div id="#{clientId}_GridHeaderTemplate" class="dr-sdt-inlinebox" style="#{hStyle}; width: #{component.attributes['width']};">
 							<iframe id="#{clientId}:hs" class="dr-sdt-substrate" src="" scrolling="no" frameborder="0" > <br/> </iframe>




More information about the richfaces-svn-commits mailing list