Skip to content
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 "check all" checkbox for tables loaded via ajax #7310

Merged
merged 1 commit into from May 8, 2019

Conversation

escopecz
Copy link
Sponsor Member

@escopecz escopecz commented Mar 8, 2019

Please be sure you are submitting this against the staging branch.

Q A
Bug fix? Y
New feature? N
Automated tests included? N
Related user documentation PR URL /
Related developer documentation PR URL /
Issues addressed (#s or URLs) /
BC breaks? N
Deprecations? N

Description:

This issue this PR is fixing happens when the table is loaded via AJAX in a tab. In this scenario the target is null and later it will find all parentsUntil(null) which means all and removes the active class from them. Normally, there is no harm in that, but tabs use active class too and when removed the content disappears.

The solution I suggest is to read the target on change event. Not only on load which is useless for content loaded asynchronously.

Steps to reproduce the bug:

  1. A plugin is needed for this. But code-review will do.

Steps to test this PR:

  1. Make sure that selecting and unselecting all checkboxes on a table still works.

@escopecz escopecz added bug Issues or PR's relating to bugs ready-to-test PR's that are ready to test labels Mar 8, 2019
@alanhartless alanhartless added this to the 2.16.0 milestone Mar 12, 2019
@npracht npracht modified the milestones: 2.16.0, 2.15.2 Mar 28, 2019
@npracht npracht added this to Ready to Test (first time) in Mautic 2 Apr 4, 2019
@kuzmany kuzmany added ready-to-commit PR's with 2 successful tests, 1 approval, automated tests and docs and is ready to be merged and removed ready-to-test PR's that are ready to test labels May 8, 2019
@kuzmany kuzmany merged commit f475e84 into mautic:staging May 8, 2019
Mautic 2 automation moved this from Ready to Test (first time) to Merged May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs ready-to-commit PR's with 2 successful tests, 1 approval, automated tests and docs and is ready to be merged
Projects
No open projects
Mautic 2
  
Merged
Development

Successfully merging this pull request may close these issues.

None yet

5 participants