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
"check all" boxes don't work in UI with Sidekiq 6.1.0 #4619
Comments
I’d guess this is due to the jquery upgrade. |
I'm struggling to debug this issue since my JavaScript skills are sad but here's the code: $(document).on('click', '.check_all', function() {
var checked = $(this).attr('checked');
if (checked == 'checked') {
$('input[type=checkbox]', $(this).closest('table')).attr('checked', checked);
} else {
$('input[type=checkbox]', $(this).closest('table')).removeAttr('checked');
}
}); and the HTML: <th class="table-checkbox checkbox-column">
<label>
<input type="checkbox" class="check_all" />
</label>
</th> Anyone know why this wouldn't work in jQuery 1.12? |
I'm just taking a stab here, but should |
@mperham it could be due to this change in 1.9:
disclaimer: I haven't checked out the code and actually tried it |
$(document).on('click', '.check_all', function() {
var checked = $(this).attr('checked');
if (checked == 'checked') {
$('input[type=checkbox]', $(this).closest('table')).prop('checked', true);
} else {
$('input[type=checkbox]', $(this).closest('table')).prop('checked', false);
}
});
|
With a later version of jQuery I would get |
@jc00ke Yer a wizard, Jesse! This works. Any reason why it wouldn't work on any modern browser? $(document).on('click', '.check_all', function() {
$('input[type=checkbox]', $(this).closest('table')).prop('checked', this.checked);
}); |
I can't find any reasons. I'm pretty sure that's been around for a long time. |
@TheRusskiy @jc00ke Y'all are great, thank you for helping me fix the issue! |
Ruby version:
Sidekiq / Pro / Enterprise version(s):
Sidekiq 6.1.0
Pro 5.1.0
Ent 2.1.0
The box to check all items in the list doesn't check all the items displayed on the Retries, Scheduled, or Dead pages after upgrading.
The text was updated successfully, but these errors were encountered: