From 9170a118257cb59a9d0031ff93dd48364489e227 Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Mon, 30 Apr 2018 17:51:04 -0300 Subject: [PATCH] Adds new style to Tainacan Header and Subheader. Removes SecondaryMenu and creates TitleRow to hold title and breadrumbs in repository-level pages. Adds contraction functionality to PrimaryMenu. Adds event listing to Collection level (needs fixes). Several adjustments on css values to match recent design. New Implementation of ItemListing still needs improvements for resposiviness! --- src/admin/admin.vue | 44 +++- .../components/edition/item-edition-form.vue | 5 +- .../components/navigation/primary-menu.vue | 130 ++--------- .../components/navigation/secondary-menu.vue | 211 ------------------ .../components/navigation/tainacan-header.vue | 209 +++++++---------- .../navigation/tainacan-subheader.vue | 80 ++++--- src/admin/components/navigation/title-row.vue | 160 +++++++++++++ .../components/search/search-control.vue | 28 ++- src/admin/js/router.js | 10 +- src/admin/js/utilities.js | 3 + src/admin/pages/lists/categories-page.vue | 7 +- src/admin/pages/lists/collections-page.vue | 7 +- src/admin/pages/lists/events-page.vue | 8 +- src/admin/pages/lists/fields-page.vue | 5 +- src/admin/pages/lists/filters-page.vue | 5 +- src/admin/pages/lists/items-page.vue | 137 ++++++------ src/admin/scss/_variables.scss | 20 +- src/admin/scss/tainacan-admin.scss | 10 +- src/admin/tainacan-admin-i18n.php | 2 + 19 files changed, 490 insertions(+), 591 deletions(-) delete mode 100644 src/admin/components/navigation/secondary-menu.vue create mode 100644 src/admin/components/navigation/title-row.vue diff --git a/src/admin/admin.vue b/src/admin/admin.vue index 97a8b22ff..9b18023d3 100644 --- a/src/admin/admin.vue +++ b/src/admin/admin.vue @@ -2,8 +2,15 @@
- - + + +
@@ -18,6 +25,8 @@ name: "AdminPage", data(){ return { + isMenuCompressed: false, + activeRoute: '/collections' } }, components: { @@ -25,7 +34,15 @@ TainacanHeader }, created() { - this.$userPrefs.init() + this.$userPrefs.init(); + this.isMenuCompressed = (this.$route.params.collectionId != undefined); + this.activeRoute = this.$route.name; + }, + watch: { + '$route' (to) { + this.isMenuCompressed = (to.params.collectionId != undefined); + this.activeRoute = to.name; + } } } @@ -63,7 +80,7 @@ margin: $header-height auto 0 auto; position: relative; overflow-y: auto; - height: calc(100% - 58px); + height: calc(100% - 52px); @media screen and (max-width: 769px) { & { @@ -77,5 +94,24 @@ } } + #menu-compress-button { + position: absolute; + z-index: 99999; + top: 70px; + max-width: 23px; + height: 21px; + width: 23px; + border: none; + background-color: $primary-light; + color: $tertiary; + padding: 0px; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; + + .icon { + margin-top: -1px; + } + } + diff --git a/src/admin/components/edition/item-edition-form.vue b/src/admin/components/edition/item-edition-form.vue index 70cc97f5e..1a748465b 100644 --- a/src/admin/components/edition/item-edition-form.vue +++ b/src/admin/components/edition/item-edition-form.vue @@ -1,15 +1,14 @@