From 3e708f77842dbfcd82b4f906a0afc6d8f18c0bdc Mon Sep 17 00:00:00 2001 From: Joossensei Date: Mon, 21 Feb 2022 12:30:47 +0100 Subject: [PATCH] Added buttons to component and removed them from template --- .../js/app/editor/Components/Collection.vue | 175 +++++------------- templates/_macro/_macro.html.twig | 5 +- .../fields/_collection_buttons.html.twig | 16 -- .../_partials/fields/collection.html.twig | 4 + 4 files changed, 54 insertions(+), 146 deletions(-) delete mode 100644 templates/_partials/fields/_collection_buttons.html.twig diff --git a/assets/js/app/editor/Components/Collection.vue b/assets/js/app/editor/Components/Collection.vue index 8ef775c4de..90541a3c09 100644 --- a/assets/js/app/editor/Components/Collection.vue +++ b/assets/js/app/editor/Components/Collection.vue @@ -14,7 +14,7 @@ - +
-
+
+ + + +
-
+ +
@@ -62,7 +93,7 @@ :key="field.type" class="dropdown-item" :data-field="field.type" - @click="addCollectionItem(field.slug)" + @click="addCollectionItem($event)" > {{ field.label }} @@ -74,7 +105,7 @@ type="button" class="btn btn-secondary btn-small" :data-field="fields[0].slug" - @click="addCollectionItem(fields.slug)" + @click="addCollectionItem(fields.type)" > {{ labels.add_collection_item }} @@ -85,53 +116,16 @@