Merge pull request #218 from abstraktor/master

Fix compatibility with django-nested-inlines.
This commit is contained in:
Jacek Tomaszewski 2013-12-30 05:14:43 -08:00
commit c9f6fdfd10

View file

@ -67,6 +67,9 @@ var google, django, gettext;
} else if (idBits.length === 4) {
// Handle standard inlines with model used by inline more than once
idPrefix = idBits[0] + '-' + idBits[1] + '-' + idBits[2] + '-' + idPrefix;
} else if (idBits.length === 5 && idBits[3] != '__prefix__') {
// Handle nested inlines (https://github.com/Soaa-/django-nested-inlines)
idPrefix = idBits[0] + '-' + idBits[1] + '-' + idBits[2] + '-' + idBits[3] + '-' + this.origFieldname;
} else if (idBits.length === 6) {
// Handle generic inlines
idPrefix = idBits[0] + '-' + idBits[1] + '-' + idBits[2] + '-' +