django-nested-inline
django-nested-inline copied to clipboard
"Add object" button positions weirdly in tabbed inlines w/ side effect on modeltranslation
Hi there,
The solution is just to change line 45 of the inline-nested.js to the following: if ($this.prop("tagName") == "TR") {
(instead of $this.attr("tagName") )
Otherwise, the test above is always false and the Add button is positioned as a div. This has a side effect on how model translation tabs are processed in tabular inlines.
Cheers LA
Hi,
unfortunately this solution works just for one nested form. If you have more than one nested form the nested-nested add button is placed in the middle of two higher level buttons, here the screenshot
A possible workaround is to replace the
$parent.append('
contained in the "if ($this.prop("tagName") == "TR")" --> TRUE condition with
$this.filter(":last").after('
in part taken from the FALSE condition.
best,
AF
The duplicate of this issue in #15 also has a PR that fixes it in #34