Skip to content

Commit

Permalink
Merge pull request sonata-project#2889 from EmmanuelVella/patch-22
Browse files Browse the repository at this point in the history
Fix collection JS (again)
  • Loading branch information
rande committed Apr 7, 2015
2 parents 7dcaea2 + 78f9fdf commit 00efb83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Resources/public/Admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,9 @@ var Admin = {
var collection = jQuery(this);
var counter = 0;
collection.children().each(function() {
var matches = highestCounterRegexp.exec(jQuery(this).find('.form-control').attr('id'));
var matches = highestCounterRegexp.exec(jQuery('[id^="sonata-ba-field-container"]', this).attr('id'));
if (matches && matches[1] && matches[1] > counter) {
counter = matches[1];
counter = parseInt(matches[1], 10);
}
});
counters[collection.attr('id')] = counter;
Expand Down

0 comments on commit 00efb83

Please sign in to comment.