Author: nbelaevski
Date: 2007-12-10 21:54:05 -0500 (Mon, 10 Dec 2007)
New Revision: 4687
Modified:
branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
http://jira.jboss.com/jira/browse/RF-1582
Modified:
branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
---
branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-12-11
02:13:36 UTC (rev 4686)
+++
branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-12-11
02:54:05 UTC (rev 4687)
@@ -1771,16 +1771,28 @@
var dim = Richfaces.Calendar.getOffsetDimensions(element);
te.style.width = te_shadow.style.width = dim.width + 'px';
te.style.height = te_shadow.style.height = dim.height + 'px';
- te.style.left = te_shadow.style.left = element.style.left;
- te.style.top = te_shadow.style.top = element.style.top;
-
+
//Element.clonePosition(te, element);
//Element.clonePosition(te_shadow, element);
this.updateTimeEditor();
+ te_shadow.style.visibility = 'hidden';
+ te_shadow.show();
+
+ te_shadow.style.left = '0px';
+ te_shadow.style.top = '0px';
+
+ var o1 = element.cumulativeOffset();
+ var o2 = te_shadow.cumulativeOffset();
+
+ te.style.left = te_shadow.style.left = (o1[0] - o2[0]) + 'px';
+ te.style.top = te_shadow.style.top = (o1[1] - o2[1]) + 'px';
+
+ te_shadow.style.visibility = '';
+
te.show();
- te_shadow.show();
+
Element.clonePosition(this.TIME_EDITOR_LAYOUT_SHADOW_ID, this.TIME_EDITOR_LAYOUT_ID,
{offsetLeft: 3, offsetTop: 3});
},