Skip to content

Commit

Permalink
fix #21: init the OperatorsHandler only once
Browse files Browse the repository at this point in the history
  • Loading branch information
daonb committed Sep 11, 2017
1 parent 97ecac4 commit 05166cb
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions advanced_filters/templates/admin/common_js_init.html
Original file line number Diff line number Diff line change
Expand Up @@ -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);
</script>
</script>

0 comments on commit 05166cb

Please sign in to comment.