[richfaces-svn-commits] JBoss Rich Faces SVN: r11789 - in trunk/ui/orderingList/src/main: templates/org/richfaces and 1 other directory.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Mon Dec 15 14:36:08 EST 2008


Author: vmolotkov
Date: 2008-12-15 14:36:08 -0500 (Mon, 15 Dec 2008)
New Revision: 11789

Modified:
   trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js
   trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
   trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ShuttleUtils.js
   trunk/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
Log:
https://jira.jboss.org/jira/browse/RF-2239

Modified: trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js
===================================================================
--- trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js	2008-12-15 19:35:06 UTC (rev 11788)
+++ trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js	2008-12-15 19:36:08 UTC (rev 11789)
@@ -5,6 +5,7 @@
 	this.contentDiv = this.contentTable.parentNode;
 	
 	Event.observe(this.contentDiv, "scroll", this.scrollHandler.bindAsEventListener(this));
+	
 }
 
 LayoutManager.SCROLL_WIDTH = 17;

Modified: trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
===================================================================
--- trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js	2008-12-15 19:35:06 UTC (rev 11788)
+++ trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js	2008-12-15 19:36:08 UTC (rev 11789)
@@ -77,7 +77,10 @@
 		  	}	
 		}
 //---		 
-  	 	this.layoutManager.widthSynchronization();
+		var synch = function() {this.layoutManager.widthSynchronization()}.bindAsEventListener(this);
+		RichShuttleUtils.execOnLoad(
+			synch, RichShuttleUtils.Condition.ElementPresent(this.container), 100
+		);
 	},
 	
 	imageLoadListener: function (evt){

Modified: trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ShuttleUtils.js
===================================================================
--- trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ShuttleUtils.js	2008-12-15 19:35:06 UTC (rev 11788)
+++ trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ShuttleUtils.js	2008-12-15 19:36:08 UTC (rev 11789)
@@ -16,9 +16,9 @@
 	}
 };
 RichShuttleUtils.Condition = {
-	ElementPresent : function(element) {
+	ElementPresent : function(el) {
 		return function () {
-			var el = $(element);
+			//var el = $(element);
 			return el && el.offsetHeight > 0;
 		};
 	}
@@ -32,4 +32,4 @@
 	} else {
 		this.splice(index, 1);
 	}
-}
\ No newline at end of file
+};
\ No newline at end of file

Modified: trunk/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
===================================================================
--- trunk/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx	2008-12-15 19:35:06 UTC (rev 11788)
+++ trunk/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx	2008-12-15 19:36:08 UTC (rev 11789)
@@ -117,8 +117,7 @@
 		
 	<f:clientId var="cId"/>		
 	<script type="text/javascript">
-		var clientId = '#{cId}';
-		RichShuttleUtils.execOnLoad(function(){
+			var clientId = '#{cId}';
 			new Richfaces.OrderingList('#{cId}', '#{cId}internal_tab', 
 													 '#{cId}internal_header_tab', '#{cId}focusKeeper', 
 													 [['up', 'disup'], ['down', 'disdown'], ['last', 'dislast'], ['first','disfirst']],
@@ -131,8 +130,6 @@
 													 Richfaces.OrderingListSelectItem, 
 													 #{this:getColumnClassesAsJSArray(context, component)}, 
 													 #{this:getRowClassesAsJSArray(context, component)});
-		}, RichShuttleUtils.Condition.ElementPresent("#{cId}"), 100);
-		//setTimeout(init, 0);
 	</script>
 	</div> 
 </f:root>
\ No newline at end of file




More information about the richfaces-svn-commits mailing list