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
81b4c3fb
Commit
81b4c3fb
authored
Apr 16, 2013
by
Randall Leeds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stop the thread.message.annotation insanity
The annotation is the message.
parent
acbb7c50
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
11 deletions
+6
-11
controllers.coffee
h/js/controllers.coffee
+1
-1
threading.coffee
h/js/plugin/threading.coffee
+4
-9
services.coffee
h/js/services.coffee
+1
-1
No files found.
h/js/controllers.coffee
View file @
81b4c3fb
...
...
@@ -254,7 +254,7 @@ class Annotation
$scope
.
origText
=
$scope
.
model
.
$modelValue
.
text
$scope
.
delete
=
->
annotation
=
$scope
.
thread
.
message
.
annotation
annotation
=
$scope
.
thread
.
message
replies
=
$scope
.
thread
.
children
?
.
length
or
0
# We can delete the annotation if it hasn't got any replies or it is
...
...
h/js/plugin/threading.coffee
View file @
81b4c3fb
...
...
@@ -24,14 +24,12 @@ class Annotator.Plugin.Threading extends Annotator.Plugin
# Get or create a thread to contain the annotation
thread
=
(
@
annotator
.
threading
.
getContainer
annotation
.
id
)
thread
.
message
=
annotation
:
annotation
id
:
annotation
.
id
references
:
annotation
.
thread
?
.
split
(
'/'
)
thread
.
message
=
annotation
# Attach the thread to its parent, if any.
references
=
thread
.
message
?
.
references
references
=
annotation
.
thread
?
.
split
(
'/'
)
if
references
?
.
length
annotation
.
references
=
references
prev
=
references
[
references
.
length
-
1
]
@
annotator
.
threading
.
getContainer
(
prev
).
addChild
thread
...
...
@@ -47,10 +45,7 @@ class Annotator.Plugin.Threading extends Annotator.Plugin
if
thread
.
parent
?
then
@
annotator
.
threading
.
pruneEmpties
thread
.
parent
annotationsLoaded
:
(
annotations
)
=>
@
annotator
.
threading
.
thread
annotations
.
map
(
a
)
->
annotation
:
a
id
:
a
.
id
references
:
a
.
thread
?
.
split
'/'
@
annotator
.
threading
.
thread
annotations
beforeAnnotationCreated
:
(
annotation
)
=>
this
.
thread
annotation
h/js/services.coffee
View file @
81b4c3fb
...
...
@@ -297,7 +297,7 @@ class Hypothesis extends Annotator
if
annotation
.
id
?
and
annotation
.
id
!=
data
.
id
# Update the id table for the threading
thread
=
@
threading
.
getContainer
annotation
.
id
thread
.
message
.
id
=
data
.
id
thread
.
id
=
data
.
id
@
threading
.
idTable
[
data
.
id
]
=
thread
delete
@
threading
.
idTable
[
annotation
.
id
]
...
...
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