From 8775239945ee2be6b53c96d430b7dc1bbf329476 Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Mon, 19 Mar 2018 17:11:24 -0300 Subject: [PATCH] Allows continuing editing on FieldList even after closing the form. A red color indicates errors and non-saved items. Still needs to prevent this in case no change was made on Form. --- .../components/edition/field-edition-form.vue | 4 +- .../edition/filter-edition-form.vue | 4 +- src/admin/components/lists/fields-list.vue | 72 ++++++++++++----- src/admin/components/lists/filters-list.vue | 80 ++++++++++++------- src/admin/components/other/grip-icon.vue | 11 +++ src/admin/other/grip-icon.vue | 11 +++ src/admin/tainacan-admin-i18n.php | 1 + .../5a2386a7b351ee453ae028ae5c6e95a1.svg | 17 ++++ 8 files changed, 145 insertions(+), 55 deletions(-) create mode 100644 src/admin/components/other/grip-icon.vue create mode 100644 src/admin/other/grip-icon.vue create mode 100644 src/assets/5a2386a7b351ee453ae028ae5c6e95a1.svg diff --git a/src/admin/components/edition/field-edition-form.vue b/src/admin/components/edition/field-edition-form.vue index 39c255cfb..45a1e508c 100644 --- a/src/admin/components/edition/field-edition-form.vue +++ b/src/admin/components/edition/field-edition-form.vue @@ -98,10 +98,10 @@
- +
- +

{{formErrorMessage}}

diff --git a/src/admin/components/edition/filter-edition-form.vue b/src/admin/components/edition/filter-edition-form.vue index 7603b2544..7fe68198e 100644 --- a/src/admin/components/edition/filter-edition-form.vue +++ b/src/admin/components/edition/filter-edition-form.vue @@ -55,10 +55,10 @@
- +
- +

{{formErrorMessage}}

diff --git a/src/admin/components/lists/fields-list.vue b/src/admin/components/lists/fields-list.vue index 72507fb79..3c5c8c939 100644 --- a/src/admin/components/lists/fields-list.vue +++ b/src/admin/components/lists/fields-list.vue @@ -22,8 +22,12 @@ :class="{'not-sortable-item': field.id == undefined || openedFieldId == field.id, 'not-focusable-item': openedFieldId == field.id, 'disabled-field': field.enabled == false}" v-for="(field, index) in activeFieldList" :key="index">
- - {{ field.name }} + + + {{ field.name }} + ({{ $i18n.get(field.field_type_object.component)}}) @@ -52,7 +56,7 @@ @onEditionFinished="onEditionFinished()" @onEditionCanceled="onEditionCanceled()" @onErrorFound="formWithErrors = field.id" - :field="editForm"> + :field="editForms[field.id]">
@@ -74,7 +78,7 @@ :class="{ 'hightlighted-field' : hightlightedField == field.name }" v-for="(field, index) in availableFieldList" :key="index"> - {{ field.name }} + {{ field.name }} @@ -85,6 +89,7 @@ + + diff --git a/src/admin/other/grip-icon.vue b/src/admin/other/grip-icon.vue new file mode 100644 index 000000000..6a93dae9e --- /dev/null +++ b/src/admin/other/grip-icon.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/admin/tainacan-admin-i18n.php b/src/admin/tainacan-admin-i18n.php index ec80762a8..6b404458d 100644 --- a/src/admin/tainacan-admin-i18n.php +++ b/src/admin/tainacan-admin-i18n.php @@ -23,6 +23,7 @@ return [ 'export' => __('Export', 'tainacan'), 'cancel' => __('Cancel', 'tainacan'), 'save' => __('Save', 'tainacan'), + 'next' => __('Next', 'tainacan'), 'see' => __('See', 'tainacan'), 'search' => __('Search', 'tainacan'), 'advanced_search' => __('Advanced Search', 'tainacan'), diff --git a/src/assets/5a2386a7b351ee453ae028ae5c6e95a1.svg b/src/assets/5a2386a7b351ee453ae028ae5c6e95a1.svg new file mode 100644 index 000000000..90c9304dd --- /dev/null +++ b/src/assets/5a2386a7b351ee453ae028ae5c6e95a1.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + +