]> BookStack Code Mirror - bookstack/commitdiff
Fixed entity type filter bug in new search system
authorDan Brown <redacted>
Sun, 9 Apr 2017 20:12:13 +0000 (21:12 +0100)
committerDan Brown <redacted>
Sun, 9 Apr 2017 20:12:13 +0000 (21:12 +0100)
app/Services/SearchService.php
resources/assets/js/vues/search.js
resources/views/search/all.blade.php

index 8202b4997fd9f6c1dd4f3e97dadd1afed71a64d7..a2844c593f23e8c5966e393f275065b8d1937415 100644 (file)
@@ -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;
index 1fcd690c45078bd40d0f1e198c84856e566499c6..708418271f3b9cdcceb45fbd8698cc798dfffe1d 100644 (file)
@@ -53,6 +53,10 @@ let methods = {
             return;
         }
         this.appendTerm(typeTerm);
+    },
+
+    updateSearch() {
+        window.location = '/search?term=' + encodeURIComponent(this.termString);
     }
 
 };
index eb8ef51f3569d0952f2a3e25add84c2be3016300..ac5cd7db4ee0ab2b4a62802d795c1d7bc6308706 100644 (file)
@@ -40,6 +40,9 @@
                     <label><input type="checkbox" v-on:change="typeChange" v-model="search.type.book" value="book"> Book</label>
                 </div>
 
+
+                <button type="button" class="button pos" v-on:click="updateSearch">Update Search</button>
+
             </div>
 
         </div>
     </div>
 </div>
 
-@stop
-
-@section('scripts')
-    <script>
-
-
-    </script>
 @stop
\ No newline at end of file
Morty Proxy This is a proxified and sanitized view of the page, visit original site.