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
9f9b4ab9
Commit
9f9b4ab9
authored
Jul 24, 2014
by
gergely-ujvari
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1340 from hypothesis/1339-careful-location-search-sync
Be careful syncing $location.search and queries
parents
3a319177
b9d3ddad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
controllers.coffee
h/static/scripts/controllers.coffee
+1
-3
streamsearch.coffee
h/static/scripts/streamsearch.coffee
+3
-0
No files found.
h/static/scripts/controllers.coffee
View file @
9f9b4ab9
...
...
@@ -231,9 +231,6 @@ class App
$rootScope
.
$on
'$routeChangeSuccess'
,
(
event
,
next
,
current
)
->
unless
next
.
$
$route
?
then
return
$scope
.
search
.
query
=
$location
.
search
()
$scope
.
search
.
show
=
not
angular
.
equals
(
$location
.
search
(),
{})
unless
next
.
$
$route
.
originalPath
is
'/stream'
if
current
and
next
.
$
$route
.
originalPath
is
'/a/:id'
$scope
.
reloadAnnotations
()
...
...
@@ -777,6 +774,7 @@ class Search
$scope
.
filter_orderBy
=
$filter
(
'orderBy'
)
$scope
.
matches
=
[]
$scope
.
search
.
query
=
$location
.
search
()
$scope
.
search
.
show
=
true
$scope
.
render_order
=
{}
$scope
.
render_pos
=
{}
$scope
.
ann_info
=
...
...
h/static/scripts/streamsearch.coffee
View file @
9f9b4ab9
...
...
@@ -41,6 +41,9 @@ class StreamSearch
$rootScope
.
applyView
"Document"
# Non-sensical, but best for the moment
$rootScope
.
applySort
"Newest"
$scope
.
search
.
query
=
$location
.
search
()
$scope
.
search
.
show
=
not
angular
.
equals
(
$location
.
search
(),
{})
$scope
.
search
.
update
=
(
searchCollection
)
->
# Update the query parameters
query
=
queryparser
.
parseModels
searchCollection
.
models
...
...
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