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
0f0bf3e3
Commit
0f0bf3e3
authored
Jan 10, 2013
by
Randall Leeds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
re-implement showViewer on the XDM RPC
parent
73aad9a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
7 deletions
+22
-7
controllers.coffee
h/js/controllers.coffee
+1
-1
host.coffee
h/js/inject/host.coffee
+1
-0
services.coffee
h/js/services.coffee
+20
-6
No files found.
h/js/controllers.coffee
View file @
0f0bf3e3
...
...
@@ -338,7 +338,7 @@ class Viewer
$scope
.
detail
=
false
$scope
.
focus
$scope
.
annotations
if
$routeParams
.
bucket
?
if
$routeParams
.
bucket
?
and
$routeParams
.
bucket
>
0
$scope
.
annotations
=
heatmap
.
buckets
[
$routeParams
.
bucket
]
else
unless
$scope
.
detail
...
...
h/js/inject/host.coffee
View file @
0f0bf3e3
...
...
@@ -140,6 +140,7 @@ class Annotator.Host extends Annotator
addPlugin
:
{}
createAnnotation
:
{}
showEditor
:
{}
showViewer
:
{}
back
:
{}
update
:
{}
...
...
h/js/services.coffee
View file @
0f0bf3e3
...
...
@@ -158,7 +158,6 @@ class Hypothesis extends Annotator
this
.
show
()
null
showEditor
:
(
annotation
)
=>
return
unless
this
.
_canCloseUnsaved
()
thread
=
(
threading
.
getContainer
annotation
.
id
)
if
thread
.
message
?
.
annotation
angular
.
extend
thread
.
message
.
annotation
,
annotation
...
...
@@ -168,6 +167,11 @@ class Hypothesis extends Annotator
id
:
annotation
.
id
references
:
annotation
.
thread
?
.
split
(
'/'
)
this
.
showEditor
thread
.
message
.
annotation
showViewer
:
(
annotations
)
=>
annotations
=
for
a
in
annotations
thread
=
(
threading
.
getContainer
a
.
id
)
thread
.
message
?
.
annotation
or
a
this
.
showViewer
annotations
# This guy does stuff when you "back out" of the interface.
# (Currently triggered by a click on the source page.)
back
:
=>
...
...
@@ -319,13 +323,23 @@ class Hypothesis extends Annotator
id
:
annotation
.
id
ranges
:
annotation
.
ranges
showViewer
:
(
annotations
=
[],
detail
=
false
)
=>
if
(
@
visible
and
not
detail
)
or
@
unsaved_drafts
.
indexOf
(
@
editor
)
>
-
1
if
not
this
.
_canCloseUnsaved
()
then
return
# Not implemented
showViewer
:
(
annotations
=
[])
=>
return
unless
this
.
_canCloseUnsaved
()
@
element
.
injector
().
invoke
[
'$location'
,
'$rootScope'
,
'$route'
,
(
$location
,
$rootScope
,
$route
)
=>
$rootScope
.
$apply
=>
$location
.
path
(
'/viewer'
)
.
search
bucket
:
-
1
.
replace
()
$route
.
current
.
scope
.
annotations
=
annotations
$route
.
current
.
scope
.
$digest
()
]
this
.
show
()
showEditor
:
(
annotation
)
=>
return
unless
this
.
_canCloseUnsaved
()
@
element
.
injector
().
invoke
[
'$location'
,
'$rootScope'
,
(
$location
,
$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