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 #247 CSS classes for jQuery click binding do not work for Django 2.1.3 #257

Merged
merged 1 commit into from
Feb 11, 2020

Conversation

nwp90
Copy link
Contributor

@nwp90 nwp90 commented Feb 4, 2020

Fixes #247

Copy link
Owner

@crucialfelix crucialfelix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't actually test this, but I'm pretty sure this is the case.

You can easily install and run the example app with different versions: https://github.com/crucialfelix/django-ajax-selects/blob/develop/example/README.md

@@ -240,7 +240,7 @@
$(window).trigger('init-autocomplete');
// When adding new rows in inline forms, reinitialize and activate newly added rows.
$(document)
.on('click', '.inline-group ul.tools a.add, .inline-group div.add-row a, .inline-group .tabular tr.add-row td a', function() {
.on('click', '._inline-group ul.tools a.add, ._inline-group div.add-row a, ._inline-group .tabular tr.add-row td a', function() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs to include both the old classes and the new ones. Only then will it work for all supported versions.

.inline-group ul.tools a.add, .inline-group div.add-row a, .inline-group .tabular tr.add-row td a, ._inline-group ul.tools a.add, ._inline-group div.add-row a, ._inline-group .tabular tr.add-row td a

@crucialfelix
Copy link
Owner

Thanks for the PR!

@crucialfelix crucialfelix changed the title Fix for crucialfelix (upstream) github issue #247 Fix #247 CSS classes for jQuery click binding do not work for Django 2.1.3 Feb 11, 2020
@crucialfelix crucialfelix merged commit cc5b136 into crucialfelix:develop Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSS classes for jQuery click binding do not work for Django 2.1.3
2 participants