You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Martin Marinschek (JIRA)" <my...@incubator.apache.org> on 2005/07/27 14:14:23 UTC
[jira] Closed: (MYFACES-358) Make popcalendar.js more friendly with regards to onload overriding
[ http://issues.apache.org/jira/browse/MYFACES-358?page=all ]
Martin Marinschek closed MYFACES-358:
-------------------------------------
Fix Version: Nightly Build
Resolution: Fixed
Assign To: Martin Marinschek
Thanks to Mike Youngstrom for this patch
> Make popcalendar.js more friendly with regards to onload overriding
> -------------------------------------------------------------------
>
> Key: MYFACES-358
> URL: http://issues.apache.org/jira/browse/MYFACES-358
> Project: MyFaces
> Type: Improvement
> Versions: Nightly Build
> Reporter: Mike Youngstrom
> Assignee: Martin Marinschek
> Fix For: Nightly Build
>
> It may be nicer to preserve previous onload functionality when adding jscalendarInit() to window.onload in popcalendar.js.
> Here is a small patch of what I was thinking.
> Index: current/tomahawk/src/java/org/apache/myfaces/custom/calendar/resource/popcalendar.js
> ===================================================================
> --- current/tomahawk/src/java/org/apache/myfaces/custom/calendar/resource/popcalendar.js (revision 224394)
> +++ current/tomahawk/src/java/org/apache/myfaces/custom/calendar/resource/popcalendar.js (working copy)
> @@ -618,5 +618,11 @@
>
> if(jscalendarIe)
> jscalendarInit();
> -else
> - window.onload=jscalendarInit;
> \ No newline at end of file
> +else {
> + var jscalendarOnloadBackup = window.onload;
> + function jscalendarOnload() {
> + jscalendarOnloadBackup();
> + jscalendarInit();
> + }
> + window.onload=jscalendarOnload;
> +}
> \ No newline at end of file
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira