User tests: Successful: Unsuccessful:
When a radio button group changes its state, the "change" trigger is not called.
Steps to test:
jQuery('#jform_show_title0').on('change', function() { alert('Title shown'); });
jQuery('#jform_show_title1').on('change', function() { alert('Title hidden'); });
Labels |
Added:
?
|
Status | Pending | ⇒ | Ready to Commit |
Moving to RTC based on the tests by @matrikular and @chmst Thanks!
Easy | No | ⇒ | Yes |
Category | ⇒ | Administration JavaScript |
@bembelimen The code is fine but what problem does it solve? Is something broken? Since this change is very specific to the isis template, what is the advantage?
Depends, what problems you have while using radio buttons in the backend ;)
First of all it brings back the default handling for jQuery, see this small fiddle für default radio buttons: http://jsfiddle.net/e1bcoj9h/ => radio buttons triggers by default a "change" event when selected.
If you want to use this short code for the radio buttons in the Joomla! backend, it will not work.
I wanted to show different info texts depending in the chosen/seletec radio button. With default radio buttons it would work without problems (=> fiddle) with the backend button not.
And why in the Isis template? Because the radio button converter is a script in the Isis template, so I have to fix it there...
Labels |
Added:
?
|
@bembelimen I think the same goes for checked as well. In #5325 I had to do it manually jQuery(this).is(':checked')
instead of the jQuery shortcut jQuery(this)).prop( "checked", true )
@bembelimen Do you want to include the suggestion made by @dgt41 or do that in a separate pull request?
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-02-14 19:17:26 |
Labels |
Removed:
?
|
I have the feeling, that this wasn't the only place where a trigger was missing, but for now ...
@test ... works as described / expected