jazzband / django-smart-selects

chained and grouped selects for django forms
https://django-smart-selects.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.11k stars 348 forks source link

Update bindfields.js #224

Closed ChloeStevovitch closed 6 years ago

ChloeStevovitch commented 7 years ago

As I was using smart_selects into my template, i couln't make your module works : As $(window).load(function ().. is depreciated since Jquery v3, I would like to change it by $(window).on('load', function () { This solved the following error : Uncaught TypeError: a.indexOf is not a function at r.fn.init.r.fn.load (jquery.min.js:4) at bindfields.js:18 at bindfields.js:69

Also as jQuery doesn't belong to django anymore and as I am loading jQuery from my html template I'd like to remplace django.jQuery(document) by $(document). This solved the message error : Uncaught ReferenceError : django is not defined at bindfields.js:54 and at at bindfields.js:69

sources : https://stackoverflow.com/questions/37738732/jquery-3-0-url-indexof-error https://stackoverflow.com/questions/34911810/django-admin-django-is-not-defined

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 88.696% when pulling 9f05a78518ddef4c97f615b3b0c85a0c11dd9556 on ChloeStevovitch:patch-1 into ae906b95d3f8e770a7d84ee59ff53ebb1e53b883 on digi604:master.

blag commented 6 years ago

Thanks!

blag commented 6 years ago

And congrats on your first open source contribution! 😃