You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mike Youngstrom (JIRA)" <my...@incubator.apache.org> on 2005/07/23 02:48:45 UTC
[jira] Created: (MYFACES-358) Make popcalendar.js more friendly with regards to onload overriding
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
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
[jira] Closed: (MYFACES-358) Make popcalendar.js more friendly with regards to onload overriding
Posted by "Martin Marinschek (JIRA)" <my...@incubator.apache.org>.
[ 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