-
Notifications
You must be signed in to change notification settings - Fork 156
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
Added Prototype version #6
base: master
Are you sure you want to change the base?
Conversation
I'm a bit confused by this. Where is the Chosen class that is being extended by ajaxChosen? Is that a part of the ajax-chosen-rails gem? |
Hi, The Chosen class is just the original chosen javascript library. In the prototype version of chosen, you call new Chosen(element); So the prototype version of ajaxChosen wraps the Chosen object, but binds to the 'keyup' event on the input after chosen is initialized. You call it like this: new ajaxChosen(element); I'll update the README with this info too, sorry, I should have added that to the pull request |
|
||
# I'm assuming that it's ok to use the parameter name `term` to send | ||
# the form value during the ajax call. Change if absolutely needed. | ||
query_key = options.query_key || "term" |
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.
We did need to change the parameter name, so we made this configurable via a query_key
option.
Do you think this ok? If so, I'll add it to the jQuery version and also fix the comment above
@meltingice What is the status of this PR? Can this be merged? Seems like a great addition. |
Too many bugs to use |
Support the Prototype javascript framework.
Please also be aware that we have released an ajax-chosen-rails gem for use with Rails 3.1 applications.
This gem has been released with the prototype version included.