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
92151e3b
Commit
92151e3b
authored
Apr 17, 2014
by
Greg Price
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Render markup in inline threads on expand/collapse
This was a bug in
3af90ef2
.
parent
77ccf688
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
common/static/coffee/spec/discussion/view/discussion_thread_view_inline_spec.coffee
+4
-0
common/static/coffee/src/discussion/views/discussion_thread_view_inline.coffee
+2
-0
No files found.
common/static/coffee/spec/discussion/view/discussion_thread_view_inline_spec.coffee
View file @
92151e3b
...
...
@@ -48,6 +48,7 @@ describe "DiscussionThreadInlineView", ->
spyOn
(
$
,
"ajax"
)
# Avoid unnecessary boilerplate
spyOn
(
@
view
.
showView
,
"render"
)
spyOn
(
@
view
.
showView
,
"convertMath"
)
spyOn
(
@
view
,
"makeWmdEditor"
)
spyOn
(
DiscussionThreadView
.
prototype
,
"renderResponse"
)
...
...
@@ -98,5 +99,8 @@ describe "DiscussionThreadInlineView", ->
@
view
.
render
()
@
view
.
expandPost
()
expect
(
@
view
.
$el
.
find
(
".post-body"
).
text
()).
toEqual
(
@
thread
.
get
(
"body"
))
expect
(
@
view
.
showView
.
convertMath
).
toHaveBeenCalled
()
@
view
.
showView
.
convertMath
.
reset
()
@
view
.
collapsePost
()
expect
(
@
view
.
$el
.
find
(
".post-body"
).
text
()).
toEqual
(
@
thread
.
get
(
"abbreviatedBody"
))
expect
(
@
view
.
showView
.
convertMath
).
toHaveBeenCalled
()
common/static/coffee/src/discussion/views/discussion_thread_view_inline.coffee
View file @
92151e3b
...
...
@@ -46,6 +46,7 @@ if Backbone?
expandPost
:
(
event
)
=>
@
$el
.
addClass
(
'expanded'
)
@
$el
.
find
(
'.post-body'
).
html
(
@
model
.
get
(
'body'
))
@
showView
.
convertMath
()
@
$el
.
find
(
'.expand-post'
).
css
(
'display'
,
'none'
)
@
$el
.
find
(
'.collapse-post'
).
css
(
'display'
,
'block'
)
@
$el
.
find
(
'.post-extended-content'
).
show
()
...
...
@@ -60,6 +61,7 @@ if Backbone?
$
(
'html, body'
).
animate
({
scrollTop
:
postTop
})
@
$el
.
removeClass
(
'expanded'
)
@
$el
.
find
(
'.post-body'
).
html
(
@
model
.
get
(
'abbreviatedBody'
))
@
showView
.
convertMath
()
@
$el
.
find
(
'.expand-post'
).
css
(
'display'
,
'block'
)
@
$el
.
find
(
'.collapse-post'
).
css
(
'display'
,
'none'
)
@
$el
.
find
(
'.post-extended-content'
).
hide
()
...
...
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