theatlantic/django-chosen — pull request #11 by dyve (2012-03-01 12:30:45+00:00)
Title: Use unmodified Chosen, fix JavaScript jQuery sniffing

Thanks for a great django app. However, the jQuery detection gave me issues. While investigating the problem, I noticed you had modified Chosen to scan for jQuery.

I did the following things:

1) Place Chosen in static/chosen -- these are unmodified files from the Chosen repo

2) Rename static/js/chosen.jquery_ready.js to static/django-chosen/django-chosen.js, and fix the jQuery detection method. If jQuery is not found globally, but found as django.jQuery, it makes jQuery available globally.

3) Added settings for various strings (see widgets.py)

4) Changed the load order of django-chosen.js (now loads first) and the Chosen plugin so that vanilla Chosen works out of the box.

This commit places the Chosen plugin UNMODIFIED in static/chosen, and
uses a single file to scan for django.jQuery. Previous version there
JavaScript errors.