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
f5f1e858
Commit
f5f1e858
authored
Oct 12, 2012
by
David Ormsbee
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #874 from MITx/hotfix/arjun/fix_integer_disc_ids
Hotfix/arjun/fix integer disc ids
parents
73bbfe8c
c28c3f99
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
+5
-1
lms/templates/discussion/_underscore_templates.html
+5
-5
No files found.
lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
View file @
f5f1e858
...
...
@@ -156,7 +156,11 @@ if Backbone?
@
$
(
".post-list"
).
append
(
view
.
el
)
threadSelected
:
(
e
)
=>
thread_id
=
$
(
e
.
target
).
closest
(
"a"
).
data
(
"id"
)
# Use .attr('data-id') rather than .data('id') because .data does type
# coercion. Usually, this is fine, but when Mongo gives an object id with
# no letters, it casts it to a Number.
thread_id
=
$
(
e
.
target
).
closest
(
"a"
).
attr
(
"data-id"
)
@
setActiveThread
(
thread_id
)
@
trigger
(
"thread:selected"
,
thread_id
)
# This triggers a callback in the DiscussionRouter which calls the line above...
false
...
...
lms/templates/discussion/_underscore_templates.html
View file @
f5f1e858
<script
type=
"text/template"
id=
"thread-template"
>
<
article
class
=
"discussion-article"
data
-
id
=
"${'<%- id
.toString()
%>'}"
>
<
article
class
=
"discussion-article"
data
-
id
=
"${'<%- id %>'}"
>
<
div
class
=
"thread-content-wrapper"
><
/div
>
<
ol
class
=
"responses"
>
<
li
class
=
"loading"
><
div
class
=
"loading-animation"
><
/div></
li
>
...
...
@@ -7,10 +7,10 @@
<
div
class
=
"post-status-closed bottom-post-status"
style
=
"display: none"
>
This
thread
is
closed
.
<
/div
>
<
form
class
=
"discussion-reply-new"
data
-
id
=
"${'<%- id
.toString()
%>'}"
>
<
form
class
=
"discussion-reply-new"
data
-
id
=
"${'<%- id %>'}"
>
<
h4
>
Post
a
response
:
<
/h4
>
<
ul
class
=
"discussion-errors"
><
/ul
>
<
div
class
=
"reply-body"
data
-
id
=
"${'<%- id
.toString()
%>'}"
><
/div
>
<
div
class
=
"reply-body"
data
-
id
=
"${'<%- id %>'}"
><
/div
>
<
div
class
=
"reply-post-control"
>
<
a
class
=
"discussion-submit-post control-button"
href
=
"#"
>
Submit
<
/a
>
<
/div
>
...
...
@@ -117,7 +117,7 @@
</script>
<script
type=
"text/template"
id=
"response-comment-show-template"
>
<
div
id
=
"comment_${'<%- id
.toString()
%>'}"
>
<
div
id
=
"comment_${'<%- id %>'}"
>
<
div
class
=
"response-body"
>
$
{
'<%- body %>'
}
<
/div
>
<
p
class
=
"posted-details"
>&
ndash
;
posted
<
span
class
=
"timeago"
title
=
"${'<%- created_at %>'}"
>
$
{
'<%- created_at %>'
}
<
/span> b
y
$
{
"<% if (obj.username) { %>"
}
...
...
@@ -128,7 +128,7 @@
</script>
<script
type=
"text/template"
id=
"thread-list-item-template"
>
<
a
href
=
"${'<%- id
.toString() %>'}"
data
-
id
=
"${'<%- id.toString()
%>'}"
>
<
a
href
=
"${'<%- id
%>'}"
data
-
id
=
"${'<%- id
%>'}"
>
<
span
class
=
"title"
>
$
{
"<%- title %>"
}
<
/span
>
$
{
"<% if (unread_comments_count > 0) { %>"
}
<
span
class
=
"comments-count unread"
data
-
tooltip
=
"${"
<%-
unread_comments_count
%>
"} new comment${"
<%-
unread_comments_count
>
1
?
's'
:
''
%>
"}"
>
$
{
"<%- comments_count %>"
}
<
/span
>
...
...
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