Commit 1f55763b by Arjun Singh

Removing tags for now

parent 8506cbcd
......@@ -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: () ->
......
......@@ -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
......
......@@ -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>
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment