Skip to content

Commit

Permalink
Merge pull request #217 from anibalpacheco/master
Browse files Browse the repository at this point in the history
The 'row' argument was removed in recent versions of Django
  • Loading branch information
agusmakmun authored Sep 11, 2023
2 parents f1ad63a + c4ce5d4 commit 973d9c1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions martor/static/martor/js/martor.bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -869,9 +869,10 @@
});

if ('django' in window && 'jQuery' in window.django)
django.jQuery(document).on('formset:added', function (event, $row) {
$row.find('.main-martor').each(function () {
var id = $row.attr('id');
django.jQuery(document).on('formset:added', function (event) {
var row = $(event.target);
row.find('.main-martor').each(function () {
var id = row.attr('id');
id = id.substr(id.lastIndexOf('-') + 1);
// Notice here we are using our jQuery instead of Django's.
// This is because plugins are only loaded for ours.
Expand Down

0 comments on commit 973d9c1

Please sign in to comment.