From e69eb7b07e240a846858da8178cfbb5c98ae6cd2 Mon Sep 17 00:00:00 2001 From: Sergey Tereschenko Date: Fri, 19 Jul 2019 20:21:18 +0300 Subject: [PATCH] Don't patch template row for inlines (ref #475) --- .../static/modeltranslation/js/tabbed_translation_fields.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modeltranslation/static/modeltranslation/js/tabbed_translation_fields.js b/modeltranslation/static/modeltranslation/js/tabbed_translation_fields.js index 0fc06cd5..1c4b1cda 100644 --- a/modeltranslation/static/modeltranslation/js/tabbed_translation_fields.js +++ b/modeltranslation/static/modeltranslation/js/tabbed_translation_fields.js @@ -302,6 +302,8 @@ var google, django, gettext; var tabs = []; $.each(groupedTranslations, function (groupId, lang) { + if (groupId.includes("__prefix__")) + return; var tabsContainer = $(''), tabsList = $(''), insertionPoint; @@ -326,6 +328,7 @@ var google, django, gettext; $.each($container[0].attributes, function(idx, attr) { attrs[attr.nodeName] = attr.nodeValue; }); + $container.replaceWith(function () { return $('
', attrs).append($(this).contents()); });