You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2008/04/23 16:42:02 UTC

svn commit: r650892 - /myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js

Author: skitching
Date: Wed Apr 23 07:41:59 2008
New Revision: 650892

URL: http://svn.apache.org/viewvc?rev=650892&view=rev
Log:
Add TODO comment about inefficient code

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

Modified: myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/calendar/resource/popcalendar.js?rev=650892&r1=650891&r2=650892&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 Wed Apr 23 07:41:59 2008
@@ -411,6 +411,13 @@
 
             this.containerCtl.appendChild(this.selectYearDiv);
 
+			// Catch global keypresses and clicks, so that entering data into any field
+			// outside the calendar, or clicking anywhere outside the calendar, will
+			// close it.
+			//
+			// This is ugly, as it's quite a load on the client to check this for every
+			// keystroke/click. It would be nice to find an alternative...maybe register
+			// these listeners only when a calendar is open?
             Event.observe(document, "keypress", this._keypresshandler.bind(this), false);
             Event.observe(document, "click", this._clickhandler.bind(this), false);
         }