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

Multiple deleteCssClass values causes jQuery to not match query #44

Closed
elo80ka opened this issue Feb 27, 2014 · 5 comments
Closed

Multiple deleteCssClass values causes jQuery to not match query #44

elo80ka opened this issue Feb 27, 2014 · 5 comments

Comments

@elo80ka
Copy link
Owner

elo80ka commented Feb 27, 2014

From mike.rob...@gmail.com on May 14, 2012 13:22:56

What steps will reproduce the problem? 1. Set deleteCssClass to have multiple values (e.g. "btn btn-danger") What is the expected output? What do you see instead? Remove link should have click handler event bound properly. Instead, no matches are found and nothing happens when the delete link is clicked. What version of the product are you using? On what operating system? 1.2 - Mac OS X 10.7.3 Please provide any additional information below.

Original issue: http://code.google.com/p/django-dynamic-formset/issues/detail?id=44

@elo80ka elo80ka self-assigned this Feb 27, 2014
@elo80ka
Copy link
Owner Author

elo80ka commented Feb 27, 2014

From sai...@sairon.cz on October 30, 2012 17:38:33

Hello,

I've had the same issue, noticed when using multiple CSS classes w/ Bootstrap. Problem could be simply solved by replacing code

row.find('a.' + options.deleteCssClass).click(function() {

(line 60 in latest 1.3-pre: http://code.google.com/p/django-dynamic-formset/source/browse/trunk/src/jquery.formset.js#60 )

by

row.find('a.' + options.deleteCssClass.replace(/\s+/g, '.')).click(function() {

That replaces all the spaces in deleteCssClass by dots, what should solve the issue.

@elo80ka
Copy link
Owner Author

elo80ka commented Feb 27, 2014

From nome...@gmail.com on November 28, 2012 02:53:56

Issue and fix confirmed here.

@elo80ka
Copy link
Owner Author

elo80ka commented Feb 27, 2014

From alekwis...@gmail.com on January 31, 2013 03:10:46

Same here - this fix works fine!

@elo80ka
Copy link
Owner Author

elo80ka commented Feb 27, 2014

From stan.madueke on February 01, 2013 04:39:20

Thanks for the updates guys.

Status: Accepted
Owner: stan.madueke

@elo80ka
Copy link
Owner Author

elo80ka commented Aug 10, 2014

Fixed in 1d57afe.

@elo80ka elo80ka closed this as completed Aug 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant