You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2006/02/26 18:22:28 UTC

svn commit: r381122 - in /myfaces/tomahawk/trunk: core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js examples/simple/src/main/webapp/calendar.jsp

Author: mmarinschek
Date: Sun Feb 26 09:22:24 2006
New Revision: 381122

URL: http://svn.apache.org/viewcvs?rev=381122&view=rev
Log:
fixed bugs in calendar (+/- not working if more than one element)

Modified:
    myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js
    myfaces/tomahawk/trunk/examples/simple/src/main/webapp/calendar.jsp

Modified: myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js?rev=381122&r1=381121&r2=381122&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js (original)
+++ myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js Sun Feb 26 09:22:24 2006
@@ -712,7 +712,7 @@
 
 org_apache_myfaces_PopupCalendar.prototype._createAndAddYear = function(newYear, i)
 {
-    var parentNode = document.getElementById("y" + i);
+    var parentNode = document.getElementById(this.containerCtl.getAttribute("id")+"y" + i);
 
     this._removeAllChildren(parentNode);
 
@@ -841,7 +841,7 @@
             selectYearTableBody.appendChild(yearRow);
 
             var yearCell = document.createElement("td");
-            yearCell.setAttribute("id", "y" + j);
+            yearCell.setAttribute("id", this.containerCtl.getAttribute("id")+"y" + j);
             yearRow.appendChild(yearCell);
 
             Event.observe(yearCell, "mouseover", function(event)
@@ -1369,12 +1369,10 @@
     this.calendarDiv.style.visibility = (this.dom || this.ie)? "visible" : "show";
     this.bCalendarHidden = false;
 
-
-    //make sure hideElement really hides the element on first startup of the server
     setTimeout((function()
     {
         this._hideElement(this.calendarDiv);
-    }).bind(this), 100);
+    }).bind(this), 200);
 
     this._hideElement(this.calendarDiv);
 

Modified: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/calendar.jsp
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/calendar.jsp?rev=381122&r1=381121&r2=381122&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/calendar.jsp (original)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/calendar.jsp Sun Feb 26 09:22:24 2006
@@ -59,7 +59,14 @@
                 currentDayCellClass="currentDayCell" value="#{calendarBean.secondDate}" renderAsPopup="true"
                 popupTodayString="#{example_messages['popup_today_string']}"
                 popupDateFormat="MM/dd/yyyy" popupWeekString="#{example_messages['popup_week_string']}"
-                helpText="MM/DD/YYYY" onchange="document.getElementById('calendarForm2').submit();"/>
+                helpText="MM/DD/YYYY"/>
+
+            <t:inputCalendar id="thirdOne" monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" popupButtonStyleClass="standard_bold"
+                currentDayCellClass="currentDayCell" value="#{calendarBean.secondDate}" renderAsPopup="true"
+                popupTodayString="#{example_messages['popup_today_string']}"
+                popupDateFormat="MM/dd/yyyy" popupWeekString="#{example_messages['popup_week_string']}"
+                helpText="MM/DD/YYYY"/>
+
             <h:inputText value="#{calendarBean.text}"/>
             <h:commandButton value="#{example_messages['js_submit']}" action="#{calendarBean.submitMethod}" />
         </h:form>