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
1bf085ea
Commit
1bf085ea
authored
Aug 06, 2013
by
Ujvari Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test version: search results are loaded back and shown.
parent
2265b3d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
services.coffee
h/js/services.coffee
+14
-2
No files found.
h/js/services.coffee
View file @
1bf085ea
...
...
@@ -51,8 +51,8 @@ class Hypothesis extends Annotator
viewer
:
addField
:
(
->
)
this
.
$inject
=
[
'$document'
,
'$filter'
,
'$location'
,
'$rootScope'
,
'$route'
,
'drafts'
]
constructor
:
(
$document
,
$filter
,
$location
,
$rootScope
,
$route
,
drafts
)
->
this
.
$inject
=
[
'$document'
,
'$filter'
,
'$location'
,
'$rootScope'
,
'$route'
,
'
$timeout'
,
'
drafts'
]
constructor
:
(
$document
,
$filter
,
$location
,
$rootScope
,
$route
,
$timeout
,
drafts
)
->
Gettext
.
prototype
.
parse_locale_data
annotator_locale_data
super
(
$document
.
find
'body'
)
...
...
@@ -257,9 +257,21 @@ class Hypothesis extends Annotator
clearSearch
:
(
original
)
=>
@
show_search
=
false
original
()
unless
typeof
(
localStorage
)
is
'undefined'
try
localStorage
.
setItem
"hyp_page_search_query"
,
""
catch
error
console
.
warn
'Cannot save query to localStorage!'
if
error
is
DOMException
.
QUOTA_EXCEEDED_ERR
console
.
warn
'localStorage quota exceeded!'
$location
.
path
(
'/viewer'
)
$rootScope
.
$digest
()
if
search_query
.
length
>
0
$timeout
=>
@
visualSearch
.
searchBox
.
searchEvent
(
''
)
,
1500
_setupXDM
:
->
$location
=
@
element
.
injector
().
get
'$location'
$rootScope
=
@
element
.
injector
().
get
'$rootScope'
...
...
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