Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
4583474c
Commit
4583474c
authored
Jan 19, 2015
by
Randall Leeds
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1869 from hypothesis/remove-past-data
Remove past_data
parents
74519983
bb2ad0ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
27 deletions
+1
-27
controllers.coffee
h/static/scripts/controllers.coffee
+0
-5
searchfilters.coffee
h/static/scripts/searchfilters.coffee
+0
-22
streamsearch.coffee
h/static/scripts/streamsearch.coffee
+1
-0
No files found.
h/static/scripts/controllers.coffee
View file @
4583474c
...
...
@@ -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
)
...
...
h/static/scripts/searchfilters.coffee
View file @
4583474c
...
...
@@ -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
...
...
h/static/scripts/streamsearch.coffee
View file @
4583474c
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment