Commit 63563225 authored by Ujvari Gergely's avatar Ujvari Gergely

prepare search for route_params

parent cbbd1daf
...@@ -122,9 +122,14 @@ class Hypothesis extends Annotator ...@@ -122,9 +122,14 @@ class Hypothesis extends Annotator
this.subscribe 'annotationsLoaded', -> $route.reload() this.subscribe 'annotationsLoaded', -> $route.reload()
@user_filter = $filter('userName') @user_filter = $filter('userName')
search_query = ''
params = $location.search()
if params.search_query
search_query = params.search_query
@visualSearch = VS.init @visualSearch = VS.init
container: $('.visual-search') container: $('.visual-search')
query: '' query: search_query
callbacks: callbacks:
search: (query, searchCollection) => search: (query, searchCollection) =>
unless query unless query
...@@ -200,6 +205,7 @@ class Hypothesis extends Annotator ...@@ -200,6 +205,7 @@ class Hypothesis extends Annotator
whole_document : whole_document whole_document : whole_document
matched : matched matched : matched
in_body_text: in_body_text in_body_text: in_body_text
search_query: query
$location.path('/page_search').search(search) $location.path('/page_search').search(search)
$rootScope.$digest() $rootScope.$digest()
......
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