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
381fe951
Commit
381fe951
authored
Aug 02, 2012
by
Rocky Duan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make cancel/submit work and hide watch discussion
parent
7b66cae3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
lms/static/coffee/src/discussion.coffee
+8
-4
lms/templates/discussion/_thread.html
+1
-1
No files found.
lms/static/coffee/src/discussion.coffee
View file @
381fe951
...
...
@@ -221,7 +221,7 @@ Discussion =
if
$$user_info
?
$local
(
".comment"
).
each
(
initializeVote
)
$local
(
".thread"
).
each
(
initializeVote
).
each
(
initializeWatchThreads
)
initializeWatchDiscussion
(
discussion
)
#initializeWatchDiscussion(discussion) TODO move this somewhere else
$local
(
".new-post-tags"
).
tagsInput
autocomplete_url
:
Discussion
.
urlFor
(
'tags_autocomplete'
)
...
...
@@ -262,8 +262,8 @@ Discussion =
}
$discussionContent
.
append
Mustache
.
render
Discussion
.
replyTemplate
,
view
Markdown
.
makeWmdEditor
$local
(
".reply-body"
),
"-reply-body-
#{
id
}
"
,
Discussion
.
urlFor
(
'upload'
)
$local
(
".discussion-submit-
reply
"
).
click
handleSubmitReply
$local
(
".discussion-cancel-
reply
"
).
click
handleCancelReply
$local
(
".discussion-submit-
post
"
).
click
handleSubmitReply
$local
(
".discussion-cancel-
post
"
).
click
handleCancelReply
$local
(
".discussion-link"
).
hide
()
$discussionContent
.
attr
(
"status"
,
"reply"
)
...
...
@@ -430,10 +430,13 @@ Discussion =
$local
(
".thread-title"
).
click
handleShowSingleThread
$local
(
".discussion-show-comments"
).
click
handleShowSingleThread
$local
(
".discussion-reply"
).
click
->
$local
(
".discussion-reply
-thread
"
).
click
->
handleShowSingleThread
(
$local
(
".thread-title"
))
handleReply
(
this
)
$local
(
".discussion-reply-comment"
).
click
->
handleReply
(
this
)
$local
(
".discussion-cancel-reply"
).
click
->
handleCancelReply
(
this
)
...
...
@@ -494,6 +497,7 @@ Discussion =
,
'json'
handleCancelNewPost
=
(
elem
)
->
console
.
log
"canceling"
$local
(
".new-post-form"
).
hide
()
$local
(
".discussion-new-post"
).
show
()
...
...
lms/templates/discussion/_thread.html
View file @
381fe951
...
...
@@ -70,7 +70,7 @@
<
%
def
name=
"render_bottom_bar(content, type, **kwargs)"
>
<div
class=
"info"
>
${render_info(content)}
${render_link("discussion-link discussion-reply
"
, "Reply")}
${render_link("discussion-link discussion-reply
discussion-reply-" + type
, "Reply")}
% if type == "thread" and kwargs['edit_thread'] or type == "comment":
${render_link("discussion-link discussion-edit", "Edit")}
% endif
...
...
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