Commit bb2ad0ad authored by ujvari's avatar ujvari

Remove past data support from stream filter

The processed streamfilter does not send back anything,
more_hits message can give back annotations
parent 74519983
......@@ -64,9 +64,6 @@ class AppController
else
$scope.dialog.visible = false
# Skip the remaining if this is the first evaluation.
return if oldVal is undefined
# Update any edits in progress.
for draft in drafts.all()
annotator.publish 'beforeAnnotationCreated', draft
......@@ -91,7 +88,6 @@ class AppController
identity.logout()
$scope.loadMore = (number) ->
unless streamfilter.getPastData().hits then return
streamer.send({messageType: 'more_hits', moreHits: number})
$scope.clearSelection = ->
......@@ -146,7 +142,6 @@ class AnnotationViewerController
annotator.loadAnnotations(rows)
streamfilter
.setPastDataNone()
.setMatchPolicyIncludeAny()
.addClause('/references', 'first_of', id, true)
.addClause('/id', 'equals', id, true)
......
......@@ -261,7 +261,6 @@ class QueryParser
class StreamFilter
strategies: ['include_any', 'include_all', 'exclude_any', 'exclude_all']
past_modes: ['none','hits','time']
filter:
match_policy : 'include_any'
......@@ -270,13 +269,10 @@ class StreamFilter
create: true
update: true
delete: true
past_data:
load_past: "none"
constructor: ->
getFilter: -> return @filter
getPastData: -> return @filter.past_data
getMatchPolicy: -> return @filter.match_policy
getClauses: -> return @filter.clauses
getActions: -> return @filter.actions
......@@ -284,23 +280,6 @@ class StreamFilter
getActionUpdate: -> return @filter.actions.update
getActionDelete: -> return @filter.actions.delete
setPastDataNone: ->
@filter.past_data =
load_past: 'none'
this
setPastDataHits: (hits) ->
@filter.past_data =
load_past: 'hits'
hits: hits
this
setPastDataTime: (time) ->
@filter.past_data =
load_past: 'hits'
go_back: time
this
setMatchPolicy: (policy) ->
@filter.match_policy = policy
this
......@@ -355,7 +334,6 @@ class StreamFilter
@setActionCreate(true)
@setActionUpdate(true)
@setActionDelete(true)
@setPastDataNone()
@noClauses()
this
......
......@@ -18,6 +18,7 @@ class StreamSearchController
$scope.search.query = $routeParams.q
terms = searchfilter.generateFacetedFilter $scope.search.query
queryparser.populateFilter streamfilter, terms
streamer.send({filter: streamfilter.getFilter()})
# Perform the search
searchParams = searchfilter.toObject $scope.search.query
......
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