Просмотр исходного кода

Merge pull request #937 from netounet/patch-4

Fix js for collection field
Thomas 12 лет назад
Родитель
Сommit
07e013ec1b
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Resources/public/base.js

+ 1 - 1
Resources/public/base.js

@@ -156,7 +156,7 @@ var Admin = {
 
             var container = jQuery(this).closest('[data-prototype]');
             var proto = container.attr('data-prototype');
-            proto = proto.replace(/\$\$name\$\$/g, container.children().length);
+            proto = proto.replace(/__name__/g, container.children().length);
             jQuery(proto).insertBefore(jQuery(this).parent());
             
             jQuery(this).trigger('sonata-collection-item-added');