diff --git a/src/admin/admin.vue b/src/admin/admin.vue
index 212f137e8..98e2a1476 100644
--- a/src/admin/admin.vue
+++ b/src/admin/admin.vue
@@ -37,6 +37,12 @@
margin: 0 auto;
position: relative;
overflow-y: auto;
+
+ @media screen and (max-width: 769px) {
+ & {
+ overflow-y: visible;
+ }
+ }
}
diff --git a/src/admin/components/fields-list.vue b/src/admin/components/fields-list.vue
index 9d6c6c3bf..84deb25b2 100644
--- a/src/admin/components/fields-list.vue
+++ b/src/admin/components/fields-list.vue
@@ -1,21 +1,218 @@
-
Fields List
-
+ Fields List and Edition Component
+
+
+
+
+
+
+ {{ field.name }}
+
{{field.status}}
+
+
+
+ Drag and drop Fields here to add them to Collection.
+
+
+
+
+
+
+
+ {{ field.name }}
+
+
+
+
+
+
-
+
+
diff --git a/src/admin/components/items-list.vue b/src/admin/components/items-list.vue
index 7cb115099..9883cc88a 100644
--- a/src/admin/components/items-list.vue
+++ b/src/admin/components/items-list.vue
@@ -80,7 +80,7 @@
+ :to="{ path: $routerHelper.getNewItemPath(collectionId) }">
Criar Item
@@ -186,10 +186,10 @@ export default {
this.loadItems();
},
goToItemPage(itemId) {
- this.$router.push(`/collections/${this.collectionId}/items/${itemId}`);
+ this.$router.push(this.$routerHelper.getItemPath(this.collectionId, itemId));
},
goToItemEditPage(itemId) {
- this.$router.push(`/collections/${this.collectionId}/items/${itemId}/edit`);
+ this.$router.push(this.$routerHelper.getItemEditPath(this.collectionId, itemId));
},
onPageChange(page) {
this.page = page;
diff --git a/src/admin/components/secondary-menu.vue b/src/admin/components/secondary-menu.vue
index 15b4ab4c5..91a9ee9cb 100644
--- a/src/admin/components/secondary-menu.vue
+++ b/src/admin/components/secondary-menu.vue
@@ -9,16 +9,16 @@
diff --git a/src/admin/js/router.js b/src/admin/js/router.js
index 070be1e52..f7d5b97f1 100644
--- a/src/admin/js/router.js
+++ b/src/admin/js/router.js
@@ -5,7 +5,6 @@ import AdminPage from '../admin.vue'
import CollectionsPage from '../pages/lists/collections-page.vue'
import CollectionPage from '../pages/singles/collection-page.vue'
import CollectionEditionPage from '../pages/edition/collection-edition-page.vue'
-import CollectionFieldsEditionPage from '../pages/edition/collection-fields-edition-page.vue'
import ItemsPage from '../pages/lists/items-page.vue'
import ItemPage from '../pages/singles/item-page.vue'
import ItemEditionPage from '../pages/edition/item-edition-page.vue'
@@ -40,7 +39,7 @@ const routes = [
{ path: '', redirect: 'items'},
{ path: 'items', component: ItemsList, name: 'ItemsList', meta: {title: i18nGet('title_collection_page')} },
{ path: 'edit', component: CollectionEditionPage, name: 'CollectionEditionPage', meta: {title: i18nGet('title_collection_edition')} },
- { path: 'fields', component: CollectionFieldsEditionPage, name: 'CollectionFieldsEditionPage', meta: {title: i18nGet('title_collection_fields_edition')} },
+ { path: 'fields', component: FieldsList, name: 'FieldsList', meta: {title: i18nGet('title_collection_fields_edition')} },
{ path: 'filters', component: FiltersList, name: 'FiltersList', meta: {title: i18nGet('title_collection_page')} }
]
},
diff --git a/src/admin/js/utilities.js b/src/admin/js/utilities.js
index 9515b8392..841f2c3aa 100644
--- a/src/admin/js/utilities.js
+++ b/src/admin/js/utilities.js
@@ -23,7 +23,13 @@ RouterHelperPlugin.install = function (Vue, options = {}) {
return '/collections/?' + qs.stringify(query);
},
getCollectionItemsPath(collectionId, query) {
- return 'collections/'+ collectionId + '/items/?' + qs.stringify(query);
+ return '/collections/'+ collectionId + '/items/?' + qs.stringify(query);
+ },
+ getCollectionFieldsPath(collectionId) {
+ return '/collections/'+ collectionId + '/fields/';
+ },
+ getCollectionFiltersPath(collectionId) {
+ return '/collections/'+ collectionId + '/filters/';
},
getItemsPath(query) {
return '/items/?' + qs.stringify(query);
@@ -66,7 +72,7 @@ RouterHelperPlugin.install = function (Vue, options = {}) {
getNewCollectionPath() {
return '/collections/new';
},
- getNewItemPath() {
+ getNewItemPath(collectionId) {
return '/collections/' + collectionId + '/items/new';
},
getNewFilterPath() {
diff --git a/src/admin/pages/edition/collection-edition-page.vue b/src/admin/pages/edition/collection-edition-page.vue
index 11bdef814..8eb8caae2 100644
--- a/src/admin/pages/edition/collection-edition-page.vue
+++ b/src/admin/pages/edition/collection-edition-page.vue
@@ -120,7 +120,7 @@ export default {
this.isLoading = false;
- this.$router.push('/collections/' + this.collectionId);
+ this.$router.push(this.$routerHelper.getCollectionPath(this.collectionId));
});
},
getStatusColor(status) {
@@ -159,7 +159,7 @@ export default {
.catch(error => console.log(error));
},
cancelBack(){
- this.$router.push('/collections/' + this.collectionId);
+ this.$router.push(this.$routerHelper.getCollectionPath(this.collectionId));
}
},
created(){
diff --git a/src/admin/pages/edition/collection-fields-edition-page.vue b/src/admin/pages/edition/collection-fields-edition-page.vue
deleted file mode 100644
index 488fcb6b7..000000000
--- a/src/admin/pages/edition/collection-fields-edition-page.vue
+++ /dev/null
@@ -1,218 +0,0 @@
-
-
-
Collection Fields Edition Page
-
-
-
-
-
-
- {{ field.name }}
-
(not configured)
-
-
-
- Drag and drop Fields here to add them to Collection.
-
-
-
-
-
-
-
- {{ field.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/admin/pages/edition/item-edition-page.vue b/src/admin/pages/edition/item-edition-page.vue
index d9d72b018..b11dcd496 100644
--- a/src/admin/pages/edition/item-edition-page.vue
+++ b/src/admin/pages/edition/item-edition-page.vue
@@ -113,7 +113,7 @@ export default {
this.isLoading = false;
- this.$router.push('/collections/' + this.form.collectionId + '/items/' + this.itemId);
+ this.$router.push(this.$routerHelper.getItemPath(this.form.collectionId, this.itemId));
}).catch(error => {
console.log(error);
@@ -160,7 +160,7 @@ export default {
});
},
cancelBack(){
- this.$router.push('/collections/' + this.collectionId);
+ this.$router.push(this.$routerHelper.getCollectionPath(this.collectionId));
}
},
computed: {
diff --git a/src/admin/pages/singles/collection-page.vue b/src/admin/pages/singles/collection-page.vue
index 8689fab32..cd8cedaa8 100644
--- a/src/admin/pages/singles/collection-page.vue
+++ b/src/admin/pages/singles/collection-page.vue
@@ -23,7 +23,7 @@
diff --git a/src/admin/pages/singles/item-page.vue b/src/admin/pages/singles/item-page.vue
index ef1cbc6e8..5b789d541 100644
--- a/src/admin/pages/singles/item-page.vue
+++ b/src/admin/pages/singles/item-page.vue
@@ -23,11 +23,11 @@
diff --git a/src/admin/scss/_variables.scss b/src/admin/scss/_variables.scss
index ddfed2f99..2bc1be675 100644
--- a/src/admin/scss/_variables.scss
+++ b/src/admin/scss/_variables.scss
@@ -8,7 +8,7 @@ $secondary: #1F2F56;
$secondary-invert: findColorInvert($primary);
$primary-light:#A5CDD7;
-$primary-lighter: lighten($primary-light, 10%);
+$primary-lighter: lighten($primary-light, 15%);
$primary-dark: #55A0AF;
$primary-darker: darken($primary-dark, 5%);