[richfaces-issues] [JBoss JIRA] (RF-11613) rich:calendar JS renderer uses $(this) instead jQuery(this)
Jan Papousek (Closed) (JIRA)
jira-events at lists.jboss.org
Wed Dec 7 04:48:41 EST 2011
[ https://issues.jboss.org/browse/RF-11613?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Papousek closed RF-11613.
-----------------------------
Verified. It works in CR2.
> rich:calendar JS renderer uses $(this) instead jQuery(this)
> -----------------------------------------------------------
>
> Key: RF-11613
> URL: https://issues.jboss.org/browse/RF-11613
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-input
> Affects Versions: 4.0.0.Final
> Reporter: Andrey Sisoyev
> Assignee: Brian Leathem
> Priority: Trivial
> Fix For: 4.1.0.CR1
>
>
> Hi! I've found a bug in the standard Calendar component in version 4.0.0.Final
> richfaces-components-ui-4.0.0.Final.jar/META-INF/resources/org.richfaces/calendar.js:767
> {code}
> htmlContent+='</tr><tr><td colspan="2" class="rf-cal-monthpicker-ok">'+
> '<div id="'+this.DATE_EDITOR_BUTTON_OK+'" class="rf-cal-time-btn" style="float:right;" onmousedown="jQuery(this).addClass(\'rf-cal-time-btn-press\');" onmouseout="$(this).removeClass(\'rf-cal-time-btn-press\');" onmouseup="$(this).removeClass(\'rf-cal-time-btn-press\');" onclick="RichFaces.$(\''+this.id+'\').hideDateEditor(true);"><span>'+this.options.labels.ok+'</span></div>'+
> '</td><td colspan="2" class="rf-cal-monthpicker-cancel">'+
> '<div id="'+this.DATE_EDITOR_BUTTON_CANCEL+'" class="rf-cal-time-btn" style="float:left;" onmousedown="jQuery(this).addClass(\'rf-cal-time-btn-press\');" onmouseout="$(this).removeClass(\'rf-cal-time-btn-press\');" onmouseup="$(this).removeClass(\'rf-cal-time-btn-press\');" onclick="RichFaces.$(\''+this.id+'\').hideDateEditor(false);"><span>'+this.options.labels.cancel+'</span></div>'+
> '</td>';
> {code}
> Corrected version:
> {code}
> htmlContent+='</tr><tr><td colspan="2" class="rf-cal-monthpicker-ok">'+
> '<div id="'+this.DATE_EDITOR_BUTTON_OK+'" class="rf-cal-time-btn" style="float:right;" onmousedown="jQuery(this).addClass(\'rf-cal-time-btn-press\');" onmouseout="jQuery(this).removeClass(\'rf-cal-time-btn-press\');" onmouseup="jQuery(this).removeClass(\'rf-cal-time-btn-press\');" onclick="RichFaces.$(\''+this.id+'\').hideDateEditor(true);"><span>'+this.options.labels.ok+'</span></div>'+
> '</td><td colspan="2" class="rf-cal-monthpicker-cancel">'+
> '<div id="'+this.DATE_EDITOR_BUTTON_CANCEL+'" class="rf-cal-time-btn" style="float:left;" onmousedown="jQuery(this).addClass(\'rf-cal-time-btn-press\');" onmouseout="jQuery(this).removeClass(\'rf-cal-time-btn-press\');" onmouseup="jQuery(this).removeClass(\'rf-cal-time-btn-press\');" onclick="RichFaces.$(\''+this.id+'\').hideDateEditor(false);"><span>'+this.options.labels.cancel+'</span></div>'+
> '</td>';
> {code}
> The $(this).removeClass won't work, - you have to write jQuery(this).removeClass...
> Just in case, I would suggest you scan these HTML generators for "$(this)".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list