Commit 5cb065a7 authored by Ujvari Gergely's avatar Ujvari Gergely Committed by gergely-ujvari

Simple query parameter for search

parent 09c3bc4a
......@@ -250,7 +250,7 @@ class App
query = {query: searchCollection}
unless angular.equals $location.search(), query
if $location.path() == '/viewer'
if $location.path() == '/viewer' or $location.path() == '/page_search'
$location.path('/page_search').search(query)
else
$location.path('/stream').search(query)
......
......@@ -410,8 +410,9 @@ simpleSearch = ['$parse', ($parse) ->
scope.search.clear()
scope.$watch attr.query, (query) ->
scope.searchtext = query
scope.search.update(scope.searchtext)
if query.query?
scope.searchtext = query.query
scope.search.update(scope.searchtext)
restrict: 'C'
template: '''
......
......@@ -31,8 +31,9 @@ class StreamSearch
.setPastDataHits(50)
# Apply query clauses
query = searchfilter.generateFacetedFilter $location.search().query
queryparser.populateFilter streamfilter, query
$scope.query = $location.search()['query']
terms = searchfilter.generateFacetedFilter $scope.query
queryparser.populateFilter streamfilter, terms
$scope.updater?.then (sock) ->
filter = streamfilter.getFilter()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment