Fix #323, regression introduced in b7caab8677

@w00fz I partially reverted b7caab8677, I
tested and it works with the markdown editor too. What was the reason
you changed it?

The problem introduced was the `data-collection-template` element was
changed from <script> to <ul> and then the template item is picked up
as a list item in the list, with '*' as key, instead of being ignored.
This commit is contained in:
Flavio Copes
2015-12-04 20:00:58 +01:00
parent 065e01926d
commit 1b0285836d

View File

@@ -67,7 +67,7 @@
<button class="button" type="button" data-action="add" data-key-index="{{ lastKey }}"><i class="fa fa-plus"></i> Add item</button>
</div>
<ul style="display: none;" data-collection-template="new">
<script type="text/html" data-collection-template="new">
<li data-collection-item="{{ name ~ '.*' }}">
{% if field.fields %}
{% set itemName = name ~ '.*' %}
@@ -102,7 +102,7 @@
</div>
{% endif %}
</li>
</ul>
</script>
<div style="display: none;" data-collection-config="{{ name }}" data-collection-array="{{ array ? 'true' : 'false' }}"></div>
</div>