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
6bdea3a9
Commit
6bdea3a9
authored
Oct 25, 2012
by
Randall Leeds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reply counts on threads (fix #102)
parent
c6554347
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
hypothesis.coffee
h/js/src/hypothesis.coffee
+9
-4
No files found.
h/js/src/hypothesis.coffee
View file @
6bdea3a9
...
...
@@ -407,10 +407,15 @@ class Hypothesis extends Annotator
items
.
enter
().
append
(
'li'
).
classed
(
'annotation'
,
true
)
items
.
exit
().
remove
()
items
.
each
(
d
)
->
_t
=
this
and
d3
.
select
(
this
)
unless
_t
and
_t
.
classed
(
'detail'
)
_t
.
html
Handlebars
.
templates
.
detail
d
.
message
.
annotation
.
each
(
d
)
->
# XXX: SLOW! Repeats calculation alllll the time
replyCount
=
toJSON
:
=>
undefined
valueOf
:
=>
count
=
d
.
flattenChildren
()
?
.
length
or
0
"
#{
count
}
"
+
(
if
count
==
1
then
'reply'
else
'replies'
)
d
.
message
.
annotation
.
replyCount
=
replyCount
.
html
(
d
)
->
Handlebars
.
templates
.
detail
d
.
message
.
annotation
.
classed
(
'paper'
,
(
c
)
->
not
c
.
parent
.
message
?
)
.
classed
(
'detail'
,
true
)
.
classed
(
'summary'
,
false
)
...
...
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