From 05166cbc5896b75e567155f64f7b1016f3b9e90e Mon Sep 17 00:00:00 2001 From: benny daon Date: Mon, 11 Sep 2017 18:01:53 +0300 Subject: [PATCH] fix #21: init the OperatorsHandler only once --- .../templates/admin/common_js_init.html | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/advanced_filters/templates/admin/common_js_init.html b/advanced_filters/templates/admin/common_js_init.html index 509cd5e..94c3979 100644 --- a/advanced_filters/templates/admin/common_js_init.html +++ b/advanced_filters/templates/admin/common_js_init.html @@ -12,16 +12,7 @@ prefix: "{{ formset.prefix }}", adminStaticPrefix: '{% static "admin/" %}', addText: "{% trans "Add another filter" %}", - deleteText: "{% trans 'Remove' %}", - added: function(row) { - if (_af_handlers) _af_handlers.init(); // re-init - - // call original "added" callback - $.fn.tabularFormset.default_added(row); - }, - preAdded: function(row) { - if (_af_handlers) _af_handlers.destroy(); // cleanup - } - }); + deleteText: "{% trans 'Remove' %}" + }); })(django.jQuery); - \ No newline at end of file +