From 5114762861feb67541e50d4042cc072dfb04813c Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Fri, 27 Mar 2020 14:12:20 -0300 Subject: [PATCH 1/3] Scroll term edition form into view when opening it. --- src/views/admin/components/edition/term-edition-form.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/admin/components/edition/term-edition-form.vue b/src/views/admin/components/edition/term-edition-form.vue index 2a4c92957..ac41f67de 100644 --- a/src/views/admin/components/edition/term-edition-form.vue +++ b/src/views/admin/components/edition/term-edition-form.vue @@ -251,6 +251,7 @@ this.$nextTick() .then(() => { this.updateExtraFormData(this.editForm); + document.getElementById('termEditForm').scrollIntoView(); }); this.showCheckboxesWarning = false; From 1f8af0789ae348ae23d52cd9a8a9899bcb081e7b Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Fri, 27 Mar 2020 14:34:56 -0300 Subject: [PATCH 2/3] Scrolls items page to top of search control every time search is reloading. --- src/views/admin/pages/lists/items-page.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/views/admin/pages/lists/items-page.vue b/src/views/admin/pages/lists/items-page.vue index 1f24d8cd8..819e3e6eb 100644 --- a/src/views/admin/pages/lists/items-page.vue +++ b/src/views/admin/pages/lists/items-page.vue @@ -4,7 +4,8 @@ 'repository-level-page': isRepositoryLevel, 'is-filters-menu-open': isFiltersModalActive && !openAdvancedSearch }" - aria-live="polite"> + aria-live="polite" + ref="items-page-container"> { + + if (isLoadingItems != this.isLoadingItems && this.$refs['items-page-container'] && this.$refs['search-control']) { + + if ((this.$refs['search-control'].classList.contains('floating-search-control'))) + this.$refs['search-control'].classList.remove('floating-search-control'); + + this.$refs['items-page-container'].scrollTo({ top: this.$refs['search-control'].offsetTop - 42, behavior: 'smooth'}); + } + this.isLoadingItems = isLoadingItems; }); From 8c67b65790aa3b2f628db3ecd75dc643becf76cc Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Fri, 27 Mar 2020 15:02:09 -0300 Subject: [PATCH 3/3] Adjustments to page scroll on repository level. --- .../tainacan-collection-subheader.vue | 83 ++----------------- src/views/admin/pages/lists/items-page.vue | 2 +- 2 files changed, 7 insertions(+), 78 deletions(-) diff --git a/src/views/admin/components/navigation/tainacan-collection-subheader.vue b/src/views/admin/components/navigation/tainacan-collection-subheader.vue index 9e5abf07d..744bd5872 100644 --- a/src/views/admin/components/navigation/tainacan-collection-subheader.vue +++ b/src/views/admin/components/navigation/tainacan-collection-subheader.vue @@ -28,17 +28,7 @@