Browse Source

Update collection prototype $$name$$ javascript replace

Emmanuel Vella 13 năm trước cách đây
mục cha
commit
59ba8e9d66
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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());
         });