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
0e6b7d77
Commit
0e6b7d77
authored
Sep 04, 2012
by
Rocky Duan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only bind delete events to threads but not responses
parent
f93e09d3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
lms/static/coffee/src/discussion/views/discussion_content_view.coffee
+10
-0
lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
+0
-1
lms/templates/discussion/_underscore_templates.html
+4
-4
No files found.
lms/static/coffee/src/discussion/views/discussion_content_view.coffee
View file @
0e6b7d77
...
...
@@ -62,5 +62,15 @@ class @DiscussionContentView extends Backbone.View
if
@
attrRenderer
[
attr
]
@
attrRenderer
[
attr
].
apply
(
@
,
[
value
])
$
:
(
selector
)
->
@
$local
.
find
(
selector
)
initLocal
:
->
@
$local
=
@
$el
.
children
(
".local"
)
if
not
@
$local
.
length
@
$local
=
@
$el
@
$delegateElement
=
@
$local
initialize
:
->
@
initLocal
()
@
model
.
bind
(
'change'
,
@
renderPartialAttrs
,
@
)
lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
View file @
0e6b7d77
...
...
@@ -75,7 +75,6 @@ class @DiscussionThreadListView extends Backbone.View
@
trigger
"threads:rendered"
renderThreadListItem
:
(
thread
)
=>
console
.
log
"rendering"
view
=
new
ThreadListItemView
(
model
:
thread
)
view
.
on
"thread:selected"
,
@
threadSelected
view
.
on
"thread:removed"
,
@
threadRemoved
...
...
lms/templates/discussion/_underscore_templates.html
View file @
0e6b7d77
<script
type=
"text/template"
id=
"thread-template"
>
<
article
class
=
"discussion-article"
data
-
id
=
"${'<%- id %>'}"
>
<
a
href
=
"javascript:void(0)"
class
=
"dogear action-follow"
><
/a
>
<
div
class
=
"discussion-post"
>
<
div
class
=
"local"
><
a
href
=
"javascript:void(0)"
class
=
"dogear action-follow"
><
/a></
div
>
<
div
class
=
"discussion-post
local
"
>
<
header
>
<
a
href
=
"#"
class
=
"vote-btn discussion-vote discussion-vote-up"
data
-
role
=
"discussion-vote"
><
span
class
=
"plus-icon"
>+<
/span> <span class='votes-count-number'>${'<%- votes
[
"up_count"
]
%>'}</
span
><
/a
>
<
h1
>
$
{
'<%- title %>'
}
<
/h1
>
...
...
@@ -30,10 +30,10 @@
<
ol
class
=
"responses"
>
<
li
class
=
"loading"
><
div
class
=
"loading-animation"
><
/div></
li
>
<
/ol
>
<
div
class
=
"post-status-closed bottom-post-status"
style
=
"display: none"
>
<
div
class
=
"
local
post-status-closed bottom-post-status"
style
=
"display: none"
>
This
thread
is
closed
.
<
/div
>
<
form
class
=
"discussion-reply-new"
data
-
id
=
"${'<%- id %>'}"
>
<
form
class
=
"
local
discussion-reply-new"
data
-
id
=
"${'<%- id %>'}"
>
<
h4
>
Post
a
response
:
<
/h4
>
<
ul
class
=
"discussion-errors"
><
/ul
>
<
div
class
=
"reply-body"
><
/div
>
...
...
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