From 5af7fbfbf99a44d8e76cc88e5c3bf3e8b9f0e623 Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Mon, 26 Feb 2018 09:35:20 -0300 Subject: [PATCH] Adds IDs to Collection and Item creation. Adds props ID to Tainacan Field Types in order to allow tests automation. --- src/admin/components/primary-menu.vue | 9 ++++-- src/admin/components/secondary-menu.vue | 30 ++++++++++++++++++- .../pages/edition/collection-edition-page.vue | 3 ++ src/admin/pages/edition/item-edition-page.vue | 7 +++-- src/classes/field-types/checkbox/Checkbox.vue | 5 ++-- src/classes/field-types/date/Date.vue | 10 +++++-- src/classes/field-types/numeric/Numeric.vue | 14 +++++---- src/classes/field-types/radio/Radio.vue | 4 ++- .../field-types/relationship/Relationship.vue | 4 ++- .../field-types/selectbox/Selectbox.vue | 6 +++- .../field-types/tainacan-form-item.vue | 4 +-- src/classes/field-types/text/Text.vue | 7 +++-- src/classes/field-types/textarea/Textarea.vue | 13 +++++--- 13 files changed, 90 insertions(+), 26 deletions(-) diff --git a/src/admin/components/primary-menu.vue b/src/admin/components/primary-menu.vue index d81002e9e..a670fc95b 100644 --- a/src/admin/components/primary-menu.vue +++ b/src/admin/components/primary-menu.vue @@ -15,6 +15,7 @@
  • {{ $i18n.get('items')}}
  • +
  • {{ $i18n.get('fields')}}
  • @@ -54,7 +55,7 @@ export default { }, created () { this.isCompressed = (this.$route.params.id != undefined); - this.activeRoute = this.$route.to; + this.activeRoute = this.$route.name; } } @@ -89,7 +90,11 @@ export default { -webkit-transition: opacity 0.15s linear, visibility 0.15s linear; } } - + .separator { + height: 2px; + background-color: $primary-darker; + width: 100%; + } li{ a { color: white; diff --git a/src/admin/components/secondary-menu.vue b/src/admin/components/secondary-menu.vue index 1ed2ca0e1..ce1ee31b9 100644 --- a/src/admin/components/secondary-menu.vue +++ b/src/admin/components/secondary-menu.vue @@ -1,6 +1,13 @@ @@ -30,7 +30,8 @@ options: { type: String }, - value: [String, Number, Array] + value: [String, Number, Array], + id: '' }, watch: { checked: function(val){ diff --git a/src/classes/field-types/date/Date.vue b/src/classes/field-types/date/Date.vue index 6204612fd..f69509119 100644 --- a/src/classes/field-types/date/Date.vue +++ b/src/classes/field-types/date/Date.vue @@ -1,8 +1,9 @@