Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
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
edx
edx-platform
Commits
00ff1b94
Commit
00ff1b94
authored
Aug 15, 2012
by
Rocky Duan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
can retrieve all comments
parent
e5fe54ca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
lms/static/coffee/src/discussion/content.coffee
+3
-2
lms/templates/discussion/_thread.html
+2
-2
No files found.
lms/static/coffee/src/discussion/content.coffee
View file @
00ff1b94
...
...
@@ -265,7 +265,7 @@ initializeFollowThread = (thread) ->
$threadTitle
=
$local
(
".thread-title"
)
$showComments
=
$local
(
".discussion-show-comments"
)
if
not
$showComments
.
length
or
not
$threadTitle
.
length
if
not
$showComments
.
hasClass
(
"first-time"
)
and
(
not
$showComments
.
length
or
not
$threadTitle
.
length
)
return
rebindHideEvents
=
->
...
...
@@ -277,7 +277,7 @@ initializeFollowThread = (thread) ->
$showComments
.
html
prevHtml
.
replace
"Show"
,
"Hide"
if
$content
.
children
(
".comments"
).
length
if
not
$showComments
.
hasClass
(
"first-time"
)
and
$content
.
children
(
".comments"
).
length
$content
.
children
(
".comments"
).
show
()
rebindHideEvents
()
else
...
...
@@ -294,6 +294,7 @@ initializeFollowThread = (thread) ->
$content
.
find
(
".comment"
).
each
(
index
,
comment
)
->
Discussion
.
initializeContent
(
comment
)
Discussion
.
bindContentEvents
(
comment
)
$showComments
.
removeClass
(
"first-time"
)
rebindHideEvents
()
Discussion
.
bindLocalEvents
$local
,
...
...
lms/templates/discussion/_thread.html
View file @
00ff1b94
...
...
@@ -134,8 +134,8 @@
</div>
<div
class=
"comment-count"
>
% if content.get('comments_count', -1) >= 0:
% if
kwargs.get('show_comments') is True
:
<a
href=
"javascript:void(0)"
class=
"discussion-
hide-comments"
>
Hide ${content['comments_count']} ${pluralize('comment', content['comments_count'])}
</a>
% if
discussion_type == 'user'
:
<a
href=
"javascript:void(0)"
class=
"discussion-
show-comments first-time"
>
Show all comments (${content['comments_count']} total)
</a>
% else:
<a
href=
"javascript:void(0)"
class=
"discussion-show-comments"
>
Show ${content['comments_count']} ${pluralize('comment', content['comments_count'])}
</a>
% endif
...
...
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