Comments (6)
It was working fine for me and for other people, but obviously there is still something wrong.
jQuery is included, and if it wasn't then you couldn't do $(document).ready
I will investigate and get a fix asap.
Thanks!
from django-ajax-selects.
Django changed the naming of the popup window. This is why the handler function didn't catch the callback that updates the inputs.
The other issue was that there are two jquery: Django's and ajax_selects. It's not wise to use Django's, and it only works in the admin. But it does mean having to do a separate wait on djangoJQuery(document).ready(function () {
before it can patch the django admin window closer function.
I tried to switch to using the Django's input.on("changed", ...)
event handler, but it doesn't get the id nor the string repr.
from django-ajax-selects.
I figured out solution for me. In ajax_select.js added some extra code:
[...]
$(document).ready(function () {
\ extra code goes here
[...]
})(window.jQuery);
Modified ajax_select.js:
ajax_select.js.txt
from django-ajax-selects.
Are you using this in the Django admin or on a separate page? It looks like your fix is going to overwrite Django's existing function (if running in admin):
$(document).ready(function () {
// extra code for add new fix
window.dismissAddRelatedObjectPopup = function (win, newId, newRepr) {
from django-ajax-selects.
I'm using Django admin.
Maybe I figured out what is wrong with v3.0.0 ajax_select.js in Django 4.2.8/5.0:
ajax_select.js code in lines 187-209 must by inside
$(document).ready(function () {
<-- here
[...]
});
except:
var input = $("#" + win.name);
must be:
var input = $("#" + win.name.split('__')[0]);
Proposed solution of ajax_select.js attached.
Sorry about my weak knowledge of Javascript!
from django-ajax-selects.
Release tommorrow
from django-ajax-selects.
Related Issues (20)
- How to customize Widger from textbox to dropdownlist HOT 3
- Problems to implement add button outside the admin HOT 3
- Autocomplete using `inlineformset_factory`
- Documentation & example code using different urls.py HOT 1
- Issue with wagtail fields after updating from 1.7 => 1.8 HOT 2
- Django-ajax-selects and Django Rest Framework HOT 1
- Not sure what Tag is. HOT 1
- bug? add new item, initialize inline item with django-nested-admin HOT 4
- AutoCompleteSelectMultiple add new stopped to work with Django 4.1 HOT 6
- In Django 4.2 admin the search-field is displayed wrong (too large and beside item-list) HOT 3
- Admin in dark mode = trash/delete/remove icon invisible HOT 6
- How add to ajax request additional GET params? HOT 2
- Update documentation for Django 4.2
- the 3.0.0 release broke 2.2.0 for older python HOT 13
- extra_attrs tag deformed in templates
- Django add new popup window not working if nested HOT 1
- `collectstatic` doesn't work properly with new version of `jquery-ui`
- Uncaught TypeError: Cannot read properties of undefined (reading 'window.django.jQuery')
- error jquery library upgrading from Django 3.2 to Django 4.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-ajax-selects.