From 9c0a763692b8cf3306a11a5fb46cccf0ff6eace3 Mon Sep 17 00:00:00 2001 From: Mateus Machado Luna Date: Thu, 29 Nov 2018 15:05:13 -0200 Subject: [PATCH] Adds Slideshow View Mode to Terms Items Page. --- src/admin/pages/lists/term-items-page.vue | 9 ++++++--- src/theme-helper/template-tags.php | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/admin/pages/lists/term-items-page.vue b/src/admin/pages/lists/term-items-page.vue index 99c85142d..736a0392b 100644 --- a/src/admin/pages/lists/term-items-page.vue +++ b/src/admin/pages/lists/term-items-page.vue @@ -470,8 +470,8 @@
- + +

{ - this.searchControlHeight = this.$refs['search-control'].clientHeight; + if (this.$refs['search-control'] != undefined) + this.searchControlHeight = this.$refs['search-control'].clientHeight; }, 500); }, onChangeAdminViewMode(adminViewMode) { diff --git a/src/theme-helper/template-tags.php b/src/theme-helper/template-tags.php index a5e8aadea..4039aa54a 100644 --- a/src/theme-helper/template-tags.php +++ b/src/theme-helper/template-tags.php @@ -179,7 +179,7 @@ function tainacan_the_faceted_search() { $props = ' '; $default_view_mode = apply_filters( 'tainacan-default-view-mode-for-themes', 'masonry' ); - $enabled_view_modes = apply_filters( 'tainacan-enabled-view-modes-for-themes', ['table', 'cards', 'masonry'] ); + $enabled_view_modes = apply_filters( 'tainacan-enabled-view-modes-for-themes', ['table', 'cards', 'masonry', 'slideshow'] ); // if in a collection page $collection_id = tainacan_get_collection_id();