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
a40c8fad
Commit
a40c8fad
authored
Sep 06, 2012
by
Ibrahim Awwal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix inline thread rendering when expanding and contracting.
parent
b33ef47d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
lms/static/coffee/src/discussion/discussion.coffee
+4
-5
lms/static/coffee/src/discussion/views/discussion_thread_inline_view.coffee
+2
-0
No files found.
lms/static/coffee/src/discussion/discussion.coffee
View file @
a40c8fad
...
...
@@ -7,7 +7,6 @@ if Backbone?
item
.
discussion
=
@
@
comparator
=
@
sortByDateRecentFirst
@
on
"thread:remove"
,
(
thread
)
=>
console
.
log
"remove triggered"
@
remove
(
thread
)
find
:
(
id
)
->
...
...
@@ -24,8 +23,8 @@ if Backbone?
sortByDateRecentFirst
:
(
thread
)
->
-
(
new
Date
(
thread
.
get
(
"created_at"
)).
getTime
())
#return String.fromCharCode.apply(String,
# _.map(thread.get("created_at").split(""),
#return String.fromCharCode.apply(String,
# _.map(thread.get("created_at").split(""),
# ((c) -> return 0xffff - c.charChodeAt()))
#)
...
...
@@ -134,7 +133,7 @@ if Backbone?
@
$
(
".discussion-submit-post"
).
click
$
.
proxy
(
@
submitNewPost
,
@
)
@
$
(
".discussion-cancel-post"
).
click
$
.
proxy
(
@
cancelNewPost
,
@
)
@
$el
.
children
(
".blank"
).
hide
()
@
$
(
".new-post-form"
).
show
()
...
...
@@ -177,7 +176,7 @@ if Backbone?
threadView
=
new
ThreadView
el
:
$thread
[
0
],
model
:
thread
thread
.
updateInfo
response
.
annotated_content_info
@
cancelNewPost
()
cancelNewPost
:
(
event
)
->
if
@
$el
.
hasClass
(
"inline-discussion"
)
...
...
lms/static/coffee/src/discussion/views/discussion_thread_inline_view.coffee
View file @
a40c8fad
...
...
@@ -194,6 +194,7 @@ class @DiscussionThreadInlineView extends DiscussionContentView
expandPost
:
(
event
)
->
@
expanded
=
true
@
$el
.
find
(
'.post-body'
).
html
(
@
model
.
get
(
'body'
))
@
convertMath
()
@
$el
.
find
(
'.expand-post'
).
hide
()
@
$el
.
find
(
'.collapse-post'
).
show
()
@
$el
.
find
(
'.post-extended-content'
).
show
()
...
...
@@ -204,6 +205,7 @@ class @DiscussionThreadInlineView extends DiscussionContentView
collapsePost
:
(
event
)
->
@
expanded
=
false
@
$el
.
find
(
'.post-body'
).
html
(
@
model
.
get
(
'abbreviatedBody'
))
@
convertMath
()
@
$el
.
find
(
'.collapse-post'
).
hide
()
@
$el
.
find
(
'.post-extended-content'
).
hide
()
@
$el
.
find
(
'.expand-post'
).
show
()
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