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
...
@@ -437,6 +437,8 @@ class Search
shown
:
{}
shown
:
{}
more_top
:
{}
more_top
:
{}
more_bottom
:
{}
more_bottom
:
{}
more_top_num
:
{}
more_bottom_num
:
{}
buildRenderOrder
=
(
threadid
,
threads
)
=>
buildRenderOrder
=
(
threadid
,
threads
)
=>
...
@@ -445,9 +447,6 @@ class Search
...
@@ -445,9 +447,6 @@ class Search
sorted
=
$scope
.
filter_orderBy
threads
,
$scope
.
sortThread
,
true
sorted
=
$scope
.
filter_orderBy
threads
,
$scope
.
sortThread
,
true
for
thread
in
sorted
for
thread
in
sorted
console
.
log
'thread'
console
.
log
thread
$scope
.
render_pos
[
thread
.
message
.
id
]
=
$scope
.
render_order
[
threadid
].
length
$scope
.
render_pos
[
thread
.
message
.
id
]
=
$scope
.
render_order
[
threadid
].
length
$scope
.
render_order
[
threadid
].
push
thread
.
message
.
id
$scope
.
render_order
[
threadid
].
push
thread
.
message
.
id
buildRenderOrder
(
threadid
,
thread
.
children
)
buildRenderOrder
(
threadid
,
thread
.
children
)
...
@@ -498,7 +497,6 @@ class Search
...
@@ -498,7 +497,6 @@ class Search
if
annotation
.
id
in
$scope
.
search_filter
if
annotation
.
id
in
$scope
.
search_filter
threads
.
push
thread
threads
.
push
thread
console
.
log
'main found'
$scope
.
render_order
[
annotation
.
id
]
=
[]
$scope
.
render_order
[
annotation
.
id
]
=
[]
buildRenderOrder
(
annotation
.
id
,
[
thread
])
buildRenderOrder
(
annotation
.
id
,
[
thread
])
continue
continue
...
@@ -514,7 +512,6 @@ class Search
...
@@ -514,7 +512,6 @@ class Search
if
has_search_result
if
has_search_result
threads
.
push
thread
threads
.
push
thread
console
.
log
'has_search_result'
$scope
.
render_order
[
annotation
.
id
]
=
[]
$scope
.
render_order
[
annotation
.
id
]
=
[]
buildRenderOrder
(
annotation
.
id
,
[
thread
])
buildRenderOrder
(
annotation
.
id
,
[
thread
])
...
@@ -550,20 +547,22 @@ class Search
...
@@ -550,20 +547,22 @@ class Search
$scope
.
ann_info
.
more_top
[
child
.
id
]
=
setMoreTop
(
thread
.
message
.
id
,
child
)
$scope
.
ann_info
.
more_top
[
child
.
id
]
=
setMoreTop
(
thread
.
message
.
id
,
child
)
$scope
.
ann_info
.
more_bottom
[
child
.
id
]
=
setMoreBottom
(
thread
.
message
.
id
,
child
)
$scope
.
ann_info
.
more_bottom
[
child
.
id
]
=
setMoreBottom
(
thread
.
message
.
id
,
child
)
console
.
log
'search filter'
# Calculate the number of hidden annotations for <x> more labels
console
.
log
$scope
.
search_filter
for
threadid
,
order
of
$scope
.
render_order
hidden
=
0
console
.
log
'render_order'
last_shown
=
null
console
.
log
$scope
.
render_order
for
id
in
order
if
id
in
$scope
.
search_filter
console
.
log
'render_pos'
if
last_shown
?
then
$scope
.
ann_info
.
more_bottom_num
[
last_shown
]
=
hidden
console
.
log
$scope
.
render_pos
$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
$scope
.
threads
=
threads
#Replace this with threading call
$scope
.
$on
'$routeUpdate'
,
refresh
$scope
.
$on
'$routeUpdate'
,
refresh
...
@@ -575,7 +574,6 @@ class Search
...
@@ -575,7 +574,6 @@ class Search
threadid
threadid
$scope
.
clickMoreTop
=
(
id
)
->
$scope
.
clickMoreTop
=
(
id
)
->
console
.
log
'clickMoreTop'
threadid
=
$scope
.
getThreadId
id
threadid
=
$scope
.
getThreadId
id
pos
=
$scope
.
render_pos
[
id
]
pos
=
$scope
.
render_pos
[
id
]
rendered
=
$scope
.
render_order
[
threadid
]
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