-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix up the beez3 template.js #20225
Fix up the beez3 template.js #20225
Conversation
Don't use unnecessary closure, just use jQuery ready function Use javascript strict mode use event delegation where possible Make tooltips and button groups work properly with repeatable subforms
This basically an alternative to #19722 with additional improvements and cleanup. |
|
||
$(document).on('click', ".btn-group label:not(.active)", function() { | ||
var $label = $(this); | ||
var $input = $('#' + label.attr('for')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing "$" before "label". Must be var $input = $('#' + $label.attr('for'));
.
I have tested this item 🔴 unsuccessfully on 8157f49 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20225. |
jQuery collections prefixed with '$'
I have tested this item ✅ successfully on db22fd0 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20225. |
Just as a hint for testers (Beez doesn't load Bootstrap css always): to get the buttons styled correctly. Subforms don't look nice then but it is sufficient to test the concern of this pr. |
I have tested this item ✅ successfully on db22fd0 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20225. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20225. |
It took some time to merge but thanks for you fix. |
Pull Request for Issue # .
Summary of Changes
Don't use unnecessary closure, just use jQuery ready function.
Use javsacript strict mode
use event delegation where possible
Make tooltips and button groups work properly with repeatable subforms
Testing Instructions
Use beez3.
Create a page with a repeatable subform containing a radiobutton field with the btn-group class.
Expected result
Expect newly created rows to initialize btn-groups properly.
Actual result
Yes, it works.
Documentation Changes Required
No.