Browse Source

Merge pull request #564 from EmmanuelVella/patch-2

Update collection prototype $$name$$ javascript replace
Thomas 13 years ago
parent
commit
c76cf040fb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Resources/public/base.js

+ 1 - 1
Resources/public/base.js

@@ -154,7 +154,7 @@ var Admin = {
 
             var container = jQuery(this).closest('[data-prototype]');
             var proto = container.attr('data-prototype');
-            proto = proto.replace(/\$\$name\$\$/g, '');
+            proto = proto.replace(/\$\$name\$\$/g, container.children().length);
             jQuery(proto).insertBefore(jQuery(this).parent());
         });