From a822961c3669e9ddd12ce9439269737fec494a59 Mon Sep 17 00:00:00 2001 From: yihuang Date: Sat, 20 Oct 2018 11:17:57 +0800 Subject: [PATCH] Fix js error with new jQuery https://stackoverflow.com/a/37915907/645693 --- .../static/modeltranslation/js/tabbed_translation_fields.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modeltranslation/static/modeltranslation/js/tabbed_translation_fields.js b/modeltranslation/static/modeltranslation/js/tabbed_translation_fields.js index 6fd5898..0fc06cd 100644 --- a/modeltranslation/static/modeltranslation/js/tabbed_translation_fields.js +++ b/modeltranslation/static/modeltranslation/js/tabbed_translation_fields.js @@ -402,7 +402,7 @@ var google, django, gettext; // Note: The add another functionality in admin is injected through inline javascript, // here we have to run after that (and after all other ready events just to be sure). $(document).ready(function() { - $(window).load(function() { + $(window).on('load', function() { handleAddAnotherInline(); }); }); @@ -416,7 +416,7 @@ var google, django, gettext; createTabularTabs(tabularInlineGroup.getAllGroupedTranslations())); $(document).ready(function() { - $(window).load(function() { + $(window).on('load', function() { handleTabularAddAnotherInline(tabularInlineGroup); }); });