[richfaces-svn-commits] JBoss Rich Faces SVN: r2264 - trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Wed Aug 15 08:05:35 EDT 2007


Author: pyaschenko
Date: 2007-08-15 08:05:34 -0400 (Wed, 15 Aug 2007)
New Revision: 2264

Modified:
   trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
small fix

Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js	2007-08-15 11:53:57 UTC (rev 2263)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js	2007-08-15 12:05:34 UTC (rev 2264)
@@ -7,8 +7,9 @@
 Richfaces.Calendar.setElementPosition = function(element, baseElement, jointPoint, direction, offset)
 {
 	// parameters:
-	// jointPoint: {x:,y:} or ('left-top','right-top','left-bottom','right-bottom')
-	// direction:  ('left-top','right-top','left-bottom','right-bottom', 'auto')
+	// jointPoint: {x:,y:} or ('top-left','top-right','bottom'-left,'bottom-right')
+	// direction:  ('top-left','top-right','bottom'-left,'bottom-right', 'auto')
+	// offset: {x:,y:}
 	
 	var elementDim = Richfaces.Calendar.getOffsetDimensions(element);
 	var baseElementDim = Richfaces.Calendar.getOffsetDimensions(baseElement);
@@ -23,7 +24,7 @@
 	var re = /^(top|bottom)-(left|right)$/;
 	var match;
 	
-	if (typeof jointPoint=='object') {ox = jointPoint.x; oy=jointPoint.y}
+	if (typeof jointPoint=='object') {ox = jointPoint.x; oy = jointPoint.y}
 	else if ( jointPoint && (match=jointPoint.toLowerCase().match(re))!=null )
 	{
 		if (match[2]=='right') ox+=baseElementDim.width;
@@ -43,7 +44,7 @@
 	{
 		// auto
 		var theBest = {square:0};
-		// jointPoint: right-bottom, direction: left-bottom
+		// jointPoint: bottom-right, direction: bottom-left
 		var rect = {right: baseOffset[0] + baseElementDim.width, top: baseOffset[1] + baseElementDim.height};
 		rect.left = rect.right - elementDim.width;
 		rect.bottom = rect.top + elementDim.height;
@@ -52,7 +53,7 @@
 		if (s!=0)
 		{
 			if (ox>=0 && oy>=0 && theBest.square<s) theBest = {x:ox, y:oy, square:s};
-			// jointPoint: right-top, direction: left-top
+			// jointPoint: top-right, direction: top-left
 			rect = {right: baseOffset[0] + baseElementDim.width, bottom: baseOffset[1]};
 			rect.left = rect.right - elementDim.width;
 			rect.top = rect.bottom - elementDim.height;
@@ -61,7 +62,7 @@
 			if (s!=0)
 			{
 				if (ox>=0 && oy>=0 && theBest.square<s) theBest = {x:ox, y:oy, square:s};
-				// jointPoint: left-bottom, direction: right-bottom
+				// jointPoint: bottom-left, direction: bottom-right
 				rect = {left: baseOffset[0], top: baseOffset[1] + baseElementDim.height};
 				rect.right = rect.left + elementDim.width;
 				rect.bottom = rect.top + elementDim.height;
@@ -70,7 +71,7 @@
 				if (s!=0)
 				{
 					if (ox>=0 && oy>=0 && theBest.square<s) theBest = {x:ox, y:oy, square:s};
-					// jointPoint: left-top, direction: right-top
+					// jointPoint: top-left, direction: top-right
 					rect = {left: baseOffset[0], bottom: baseOffset[1]};
 					rect.right = rect.left + elementDim.width;
 					rect.top = rect.bottom - elementDim.height;
@@ -1165,6 +1166,6 @@
 	previousMonthControl: CalendarView.previousMonthControl,
 	currentMonthControl: CalendarView.currentMonthControl,
 	todayControl: CalendarView.todayControl,
-	selectedDateControl: CalendarView.selectedDateControl,
+	selectedDateControl: CalendarView.selectedDateControl
 	//resetSelectedDateControl: CalendarView.resetSelectedDateControl,
 });
\ No newline at end of file




More information about the richfaces-svn-commits mailing list