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
1f55763b
Commit
1f55763b
authored
Sep 14, 2012
by
Arjun Singh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removing tags for now
parent
8506cbcd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
20 deletions
+46
-20
lms/static/coffee/src/discussion/views/discussion_thread_view.coffee
+36
-15
lms/static/coffee/src/discussion/views/discussion_thread_view_inline.coffee
+4
-1
lms/templates/discussion/_underscore_templates.html
+5
-3
lms/templates/discussion/index.html
+1
-1
No files found.
lms/static/coffee/src/discussion/views/discussion_thread_view.coffee
View file @
1f55763b
...
...
@@ -3,7 +3,10 @@ if Backbone?
events
:
"click .discussion-submit-post"
:
"submitComment"
"click .thread-tag"
:
"tagSelected"
# TODO tags
# Until we decide what to do w/ tags, removing them.
#"click .thread-tag": "tagSelected"
$
:
(
selector
)
->
@
$el
.
find
(
selector
)
...
...
@@ -23,7 +26,11 @@ if Backbone?
@
renderShowView
()
@
renderAttrs
()
@
renderTags
()
# TODO tags
# Until we decide what to do w/ tags, removing them.
#@renderTags()
@
$
(
"span.timeago"
).
timeago
()
@
makeWmdEditor
"reply-body"
@
renderResponses
()
...
...
@@ -33,16 +40,20 @@ if Backbone?
if
@
responsesRequest
?
@
responsesRequest
.
abort
()
renderTags
:
->
# tags
for
tag
in
@
model
.
get
(
"tags"
)
if
!
tags
tags
=
$
(
'<div class="thread-tags">'
)
tags
.
append
(
"<a href='#' class='thread-tag'>
#{
tag
}
</a>"
)
@
$
(
".post-body"
).
after
(
tags
)
tagSelected
:
(
e
)
->
@
trigger
"tag:selected"
,
$
(
e
.
target
).
html
()
# TODO tags
# Until we decide what to do w/ tags, removing them.
#renderTags: ->
# # tags
# for tag in @model.get("tags")
# if !tags
# tags = $('<div class="thread-tags">')
# tags.append("<a href='#' class='thread-tag'>#{tag}</a>")
# @$(".post-body").after(tags)
# TODO tags
# Until we decide what to do w tags, removing them.
#tagSelected: (e) ->
# @trigger "tag:selected", $(e.target).html()
renderResponses
:
->
setTimeout
(
=>
...
...
@@ -102,9 +113,12 @@ if Backbone?
update
:
(
event
)
=>
newTitle
=
@
editView
.
$
(
".edit-post-title"
).
val
()
newTags
=
@
editView
.
$
(
".edit-post-tags"
).
val
()
newBody
=
@
editView
.
$
(
".edit-post-body textarea"
).
val
()
# TODO tags
# Until we decide what to do w/ tags, removing them.
#newTags = @editView.$(".edit-post-tags").val()
url
=
DiscussionUtil
.
urlFor
(
'update_thread'
,
@
model
.
id
)
DiscussionUtil
.
safeAjax
...
...
@@ -117,7 +131,11 @@ if Backbone?
data
:
title
:
newTitle
body
:
newBody
tags
:
newTags
# TODO tags
# Until we decide what to do w/ tags, removing them.
#tags: newTags
error
:
DiscussionUtil
.
formErrorHandler
(
@
$
(
".edit-post-form-errors"
))
success
:
(
response
,
textStatus
)
=>
# TODO: Move this out of the callback, this makes it feel sluggish
...
...
@@ -134,7 +152,10 @@ if Backbone?
@
createShowView
()
@
renderShowView
()
@
renderTags
()
# TODO tags
# Until we decide what to do w/ tags, removing them.
#@renderTags()
createEditView
:
()
->
...
...
lms/static/coffee/src/discussion/views/discussion_thread_view_inline.coffee
View file @
1f55763b
...
...
@@ -28,7 +28,10 @@ if Backbone?
@
delegateEvents
()
@
renderShowView
()
@
renderAttrs
()
@
renderTags
()
#TODO: Decide if we want to show tags on inline threads
# TODO tags commenting out til we decide what to do with tags
#@renderTags()
@
$
(
"span.timeago"
).
timeago
()
@
$el
.
find
(
'.post-extended-content'
).
hide
()
if
@
expanded
...
...
lms/templates/discussion/_underscore_templates.html
View file @
1f55763b
...
...
@@ -63,9 +63,11 @@
<
div
class
=
"form-row"
>
<
div
class
=
"edit-post-body"
name
=
"body"
>
$
{
"<%- body %>"
}
<
/div
>
<
/div
>
<
div
class
=
"form-row"
>
<
input
type
=
"text"
class
=
"edit-post-tags"
name
=
"tags"
placeholder
=
"Tags"
value
=
"${"
<%-
tags
%>
"}"
>
<
/div
>
##
TODO
tags
##
Until
we
decide
what
to
do
with
tags
,
commenting
them
out
.
##
<
div
class
=
"form-row"
>
##
<
input
type
=
"text"
class
=
"edit-post-tags"
name
=
"tags"
placeholder
=
"Tags"
value
=
"${"
<%-
tags
%>
"}"
>
##
<
/div
>
<
input
type
=
"submit"
class
=
"post-update"
value
=
"Update post"
>
<
a
href
=
"#"
class
=
"post-cancel"
>
Cancel
<
/a
>
<
/div
>
...
...
lms/templates/discussion/index.html
View file @
1f55763b
...
...
@@ -28,7 +28,7 @@
<div
class=
"sidebar"
></div>
<div
class=
"discussion-column"
>
<div
class=
"discussion-article blank-slate"
>
<h1>
${course.title}
discussions
</h1>
<h1>
${course.title}
Discussion
</h1>
</div>
</div>
...
...
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