[richfaces-svn-commits] JBoss Rich Faces SVN: r4566 - branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Thu Dec 6 13:20:46 EST 2007


Author: vmolotkov
Date: 2007-12-06 13:20:46 -0500 (Thu, 06 Dec 2007)
New Revision: 4566

Modified:
   branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js
Log:
bugs: RF-1541,  	 RF-1528

Modified: branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js	2007-12-06 18:05:25 UTC (rev 4565)
+++ branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js	2007-12-06 18:20:46 UTC (rev 4566)
@@ -33,21 +33,31 @@
 			
 			width = LayoutManager.calculateWidth(curCell, headCell).colWidth;
 			if (i == contentCells.length - 1) {
-				if (this.contentDiv.clientWidth != 0) {
-					width = width + (this.contentDiv.offsetWidth - this.contentDiv.clientWidth);
-				}
+				width = width + this.getScrollWidth();
 			}
 			headCell.firstChild.style.width = width + "px";
 			headCell.style.width = width + "px";
 		}
-		//this.headerTable.style.width = this.contentTable.offsetWidth + (this.contentDiv.offsetWidth - this.contentDiv.clientWidth);
+	} else {
+		this.headerTable.style.width = this.contentDiv.offsetWidth;
 	}
 }
 
+LayoutManager.prototype.getScrollWidth = function() {
+	if (this.contentDiv.clientWidth != 0) { 
+		return this.contentDiv.offsetWidth - this.contentDiv.clientWidth;
+	}
+	return 0;
+}
+
 LayoutManager.prototype.scrollHandler = function(obj) {
 	obj.headerDiv.scrollLeft = obj.contentDiv.scrollLeft;
 }
 
+LayoutManager.getHeaderWidth = function(visibleBox, realBox) {
+	return realBox.offsetWidth + (visibleBox.offsetWidth - visibleBox.clientWidth);
+}
+
 LayoutManager.isIE = function() {
 	return (/MSIE/.test(navigator.userAgent) && !window.opera);
 }




More information about the richfaces-svn-commits mailing list