From 25a7bee9f165a486bc879b17ea74ca992713bc36 Mon Sep 17 00:00:00 2001 From: Chris Youlden Date: Sat, 6 Jun 2015 08:35:13 +0100 Subject: [PATCH 1/5] Used jquery .prop to determine tagName as .attr returns undefined. --- nested_inline/static/admin/js/inlines-nested.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nested_inline/static/admin/js/inlines-nested.js b/nested_inline/static/admin/js/inlines-nested.js index 1f4a949..6f62766 100644 --- a/nested_inline/static/admin/js/inlines-nested.js +++ b/nested_inline/static/admin/js/inlines-nested.js @@ -42,7 +42,7 @@ var showAddButton = get_max_forms(options.prefix) === '' || (get_max_forms(options.prefix) - get_no_forms(options.prefix)) > 0; if ($this.length && showAddButton) { var addButton; - if ($this.attr("tagName") == "TR") { + if ($this.prop("tagName") == "TR") { // If forms are laid out as table rows, insert the // "add" button in a new table row: var numCols = this.eq(-1).children().length; From d43a0eabb5b1bdcf575359841727ffe81af0725c Mon Sep 17 00:00:00 2001 From: Chris Youlden Date: Sat, 6 Jun 2015 08:36:14 +0100 Subject: [PATCH 2/5] Modfied jquery selector so nested tabular inlines are not included - only first table is included. --- nested_inline/templates/admin/edit_inline/tabular-nested.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nested_inline/templates/admin/edit_inline/tabular-nested.html b/nested_inline/templates/admin/edit_inline/tabular-nested.html index de66d12..a12f3ed 100644 --- a/nested_inline/templates/admin/edit_inline/tabular-nested.html +++ b/nested_inline/templates/admin/edit_inline/tabular-nested.html @@ -86,7 +86,7 @@

{{ recursive_formset.opts.verbose_name_plural|capfirst }}