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
fe74f9bc
Commit
fe74f9bc
authored
Aug 24, 2012
by
Rocky Duan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reconstruct after editing
parent
cc5fbdd5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
lms/djangoapps/django_comment_client/utils.py
+1
-1
lms/static/coffee/src/discussion/content.coffee
+14
-2
No files found.
lms/djangoapps/django_comment_client/utils.py
View file @
fe74f9bc
...
...
@@ -222,7 +222,7 @@ def extend_content(content):
def
safe_content
(
content
):
fields
=
[
'id'
,
'body'
,
'course_id'
,
'anonymous'
,
'endorsed'
,
'id'
,
'
title'
,
'
body'
,
'course_id'
,
'anonymous'
,
'endorsed'
,
'parent_id'
,
'thread_id'
,
'votes'
,
'closed'
,
'created_at'
,
'updated_at'
,
'depth'
,
'type'
,
'commentable_id'
,
'comments_count'
,
'at_position_list'
,
...
...
lms/static/coffee/src/discussion/content.coffee
View file @
fe74f9bc
...
...
@@ -316,8 +316,12 @@ if Backbone?
success
:
(
response
,
textStatus
)
=>
DiscussionUtil
.
clearFormErrors
@
$
(
".discussion-update-errors"
)
@
$discussionContent
().
replaceWith
(
response
.
html
)
@
model
.
set
response
.
content
@
model
.
updateInfo
response
.
annotated_content_info
if
@
model
.
get
(
'type'
)
==
'thread'
@
model
=
new
Thread
response
.
content
else
@
model
=
new
Comment
$
.
extend
{},
response
.
content
,
{
thread
:
@
model
.
get
(
'thread'
)
}
@
reconstruct
()
@
model
.
updateInfo
response
.
annotated_content_info
,
{
forceUpdate
:
true
}
cancelEdit
:
(
event
)
->
@
$
(
".discussion-content-edit"
).
hide
()
...
...
@@ -388,6 +392,14 @@ if Backbone?
@
initTitle
()
@
initBody
()
@
initCommentViews
()
reconstruct
:
->
@
initBindings
()
@
initLocal
()
@
initTimeago
()
@
initTitle
()
@
initBody
()
@
delegateEvents
()
class
@
Thread
extends
@
Content
urlMappers
:
...
...
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