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
491dbddf
Commit
491dbddf
authored
Aug 01, 2013
by
Ujvari Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
For the more labels it displays how many more is there.
Removed debug messages
parent
f3301a45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
17 deletions
+15
-17
controllers.coffee
h/js/controllers.coffee
+15
-17
No files found.
h/js/controllers.coffee
View file @
491dbddf
...
...
@@ -437,6 +437,8 @@ class Search
shown
:
{}
more_top
:
{}
more_bottom
:
{}
more_top_num
:
{}
more_bottom_num
:
{}
buildRenderOrder
=
(
threadid
,
threads
)
=>
...
...
@@ -445,9 +447,6 @@ class Search
sorted
=
$scope
.
filter_orderBy
threads
,
$scope
.
sortThread
,
true
for
thread
in
sorted
console
.
log
'thread'
console
.
log
thread
$scope
.
render_pos
[
thread
.
message
.
id
]
=
$scope
.
render_order
[
threadid
].
length
$scope
.
render_order
[
threadid
].
push
thread
.
message
.
id
buildRenderOrder
(
threadid
,
thread
.
children
)
...
...
@@ -498,7 +497,6 @@ class Search
if
annotation
.
id
in
$scope
.
search_filter
threads
.
push
thread
console
.
log
'main found'
$scope
.
render_order
[
annotation
.
id
]
=
[]
buildRenderOrder
(
annotation
.
id
,
[
thread
])
continue
...
...
@@ -514,7 +512,6 @@ class Search
if
has_search_result
threads
.
push
thread
console
.
log
'has_search_result'
$scope
.
render_order
[
annotation
.
id
]
=
[]
buildRenderOrder
(
annotation
.
id
,
[
thread
])
...
...
@@ -550,20 +547,22 @@ class Search
$scope
.
ann_info
.
more_top
[
child
.
id
]
=
setMoreTop
(
thread
.
message
.
id
,
child
)
$scope
.
ann_info
.
more_bottom
[
child
.
id
]
=
setMoreBottom
(
thread
.
message
.
id
,
child
)
console
.
log
'search filter'
console
.
log
$scope
.
search_filter
console
.
log
'render_order'
console
.
log
$scope
.
render_order
console
.
log
'render_pos'
console
.
log
$scope
.
render_pos
# Calculate the number of hidden annotations for <x> more labels
for
threadid
,
order
of
$scope
.
render_order
hidden
=
0
last_shown
=
null
for
id
in
order
if
id
in
$scope
.
search_filter
if
last_shown
?
then
$scope
.
ann_info
.
more_bottom_num
[
last_shown
]
=
hidden
$scope
.
ann_info
.
more_top_num
[
id
]
=
hidden
last_shown
=
id
hidden
=
0
else
hidden
+=
1
if
last_shown
?
then
$scope
.
ann_info
.
more_bottom_num
[
last_shown
]
=
hidden
console
.
log
'info'
console
.
log
$scope
.
ann_info
$scope
.
threads
=
threads
#Replace this with threading call
$scope
.
$on
'$routeUpdate'
,
refresh
...
...
@@ -575,7 +574,6 @@ class Search
threadid
$scope
.
clickMoreTop
=
(
id
)
->
console
.
log
'clickMoreTop'
threadid
=
$scope
.
getThreadId
id
pos
=
$scope
.
render_pos
[
id
]
rendered
=
$scope
.
render_order
[
threadid
]
...
...
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