mirror of
https://github.com/Hopiu/django-modeltranslation.git
synced 2026-04-12 17:30:58 +00:00
Merge pull request #218 from abstraktor/master
Fix compatibility with django-nested-inlines.
This commit is contained in:
commit
c9f6fdfd10
1 changed files with 3 additions and 0 deletions
|
|
@ -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] + '-' +
|
||||
|
|
|
|||
Loading…
Reference in a new issue