From 46f3d78c8a9b8aa25c43d2449eb78e949d1dcc7e Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sun, 9 Apr 2017 21:12:13 +0100 Subject: [PATCH] Fixed entity type filter bug in new search system --- app/Services/SearchService.php | 2 +- resources/assets/js/vues/search.js | 4 ++++ resources/views/search/all.blade.php | 10 +++------- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Services/SearchService.php b/app/Services/SearchService.php index 8202b4997..a2844c593 100644 --- a/app/Services/SearchService.php +++ b/app/Services/SearchService.php @@ -175,7 +175,7 @@ class SearchService // Split filter values out $splitFilters = []; foreach ($terms['filters'] as $filter) { - $explodedFilter = explode(':', $filter, 1); + $explodedFilter = explode(':', $filter, 2); $splitFilters[$explodedFilter[0]] = (count($explodedFilter) > 1) ? $explodedFilter[1] : ''; } $terms['filters'] = $splitFilters; diff --git a/resources/assets/js/vues/search.js b/resources/assets/js/vues/search.js index 1fcd690c4..708418271 100644 --- a/resources/assets/js/vues/search.js +++ b/resources/assets/js/vues/search.js @@ -53,6 +53,10 @@ let methods = { return; } this.appendTerm(typeTerm); + }, + + updateSearch() { + window.location = '/search?term=' + encodeURIComponent(this.termString); } }; diff --git a/resources/views/search/all.blade.php b/resources/views/search/all.blade.php index eb8ef51f3..ac5cd7db4 100644 --- a/resources/views/search/all.blade.php +++ b/resources/views/search/all.blade.php @@ -40,6 +40,9 @@ + + + @@ -48,11 +51,4 @@ -@stop - -@section('scripts') - @stop \ No newline at end of file