charettes / django-colorful

Extension to the Django web framework that provides database and form color fields
https://pypi.python.org/pypi/django-colorful
MIT License
169 stars 58 forks source link

Consistent jQuery object check #4

Closed bashmish closed 12 years ago

bashmish commented 12 years ago

There is a bug that leads to improper jQuery object extending.

If some other admin widget appends jQuery object to a page then it is extended with colorPicker method. But in widget script still Django's own jQuery object is used that doen't get colorPicker method. So we need to make jQuery object check consistent in both cases.

PS: I encountered this bug trying to use your widget with django-image-cropping widget.

charettes commented 12 years ago

Thank you for this fix!

hugoArregui commented 12 years ago

I think should be replicated in jQuery.colorPicker.js, in order to use always the same jquery object.

charettes commented 12 years ago

@hugoArregui you mean in the project itself?

hugoArregui commented 12 years ago

i'm sorry, it's fixed here... i was looking at the "pip version".. there, this check "jQuery || django.jQuery" is still in js. My bad. Sorry again!

charettes commented 12 years ago

@hugoArregui no problems :) Was just trying to figure out what you were talking about.