mlavin / django-selectable

Tools and widgets for using/creating auto-complete selection widgets using Django and jQuery UI.
http://django-selectable.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
129 stars 64 forks source link

Add Another Item Dismiss Popup Patch not works for me #107

Closed mlavin closed 10 years ago

mlavin commented 10 years ago

Mark, is me again. I have a problem with the patch of dismissAddAnotherPopup. I'm currently loading djselectable js in these order:

Bootstrap.js JQuery UI.js Django JS Libraries.js DJSelectable.js

I'm working with the inline formset of issue #106, autcomplete works fine and popup appears, but dismiss function do not works in this place:

#!python
        var fieldName = windowname_to_id(win.name); /* e.g. "id_fieldname" */
        var field = $('#' + fieldName);
        var multiField = $('#' + fieldName + '_0');
        /* Check for bound selectable */
        var singleWidget = field.data('djselectable');
        var multiWidget = multiField.data('djselectable');

multiWidget and singleWidget are always null and undefined. I'd tried to call djangoAdminPatches from out of $(document).ready(function () {}), from a new $(document).ready(function () {}), in other order to, and as a last version but nothing works for me.

What can I do?


mlavin commented 10 years ago

Ok. Please let me now if you have some idea about this. Thanks again Mark.


Original Comment By:

mlavin commented 10 years ago

Yes this looks like a bug to me.


Original Comment By: Mark Lavin

mlavin commented 10 years ago

Can't reproduce on the latest version.