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
5427d9a5
Commit
5427d9a5
authored
Aug 30, 2012
by
Matthew Mongeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keep active thread active
parent
e98f1e87
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
lms/static/coffee/src/discussion/discussion_router.coffee
+8
-3
lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
+1
-0
No files found.
lms/static/coffee/src/discussion/discussion_router.coffee
View file @
5427d9a5
...
...
@@ -7,18 +7,23 @@ class @DiscussionRouter extends Backbone.Router
@
discussion
=
options
[
'discussion'
]
@
nav
=
new
DiscussionThreadListView
(
collection
:
@
discussion
,
el
:
$
(
".sidebar"
))
@
nav
.
on
"thread:selected"
,
@
navigateToThread
@
nav
.
on
"threads:rendered"
,
@
setActiveThread
@
nav
.
render
()
allThreads
:
->
true
setActiveThread
:
=>
if
@
thread
@
nav
.
setActiveThread
(
@
thread
.
get
(
"id"
))
showThread
:
(
forum_name
,
thread_id
)
->
@
nav
.
setActiveThread
(
thread_id
)
thread
=
@
discussion
.
get
(
thread_id
)
@
thread
=
@
discussion
.
get
(
thread_id
)
@
setActiveThread
(
)
if
(
@
main
)
@
main
.
undelegateEvents
()
@
main
=
new
DiscussionThreadView
(
el
:
$
(
".discussion-column"
),
model
:
thread
)
@
main
=
new
DiscussionThreadView
(
el
:
$
(
".discussion-column"
),
model
:
@
thread
)
@
main
.
render
()
navigateToThread
:
(
thread_id
)
=>
...
...
lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
View file @
5427d9a5
...
...
@@ -15,6 +15,7 @@ class @DiscussionThreadListView extends Backbone.View
renderThreads
:
=>
@
$
(
".post-list"
).
html
(
""
)
@
collection
.
each
@
renderThreadListItem
@
trigger
"threads:rendered"
renderThreadListItem
:
(
thread
)
=>
view
=
new
ThreadListItemView
(
model
:
thread
)
...
...
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