Get highlighting working.
This commit is contained in:
@@ -23,6 +23,8 @@ class @DiscussionThreadView extends DiscussionContentView
|
||||
Markdown.makeWmdEditor @$(".reply-body"), "", DiscussionUtil.urlFor("upload"), (text) -> DiscussionUtil.postMathJaxProcessor(text)
|
||||
@convertMath()
|
||||
@renderResponses()
|
||||
@highlight @$(".post-body")
|
||||
@highlight @$("h1")
|
||||
@
|
||||
|
||||
renderDogear: ->
|
||||
@@ -151,3 +153,6 @@ class @DiscussionThreadView extends DiscussionContentView
|
||||
type: "POST"
|
||||
success: (response, textStatus) =>
|
||||
@model.set('endorsed', not endorsed)
|
||||
|
||||
highlight: (el) ->
|
||||
el.html(el.html().replace(/<mark>/g, "<mark>").replace(/<\/mark>/g, "</mark>"))
|
||||
|
||||
@@ -12,6 +12,7 @@ class @ThreadListItemView extends Backbone.View
|
||||
@$el.html(@template(@model.toJSON()))
|
||||
if window.user.following(@model)
|
||||
@follow()
|
||||
@highlight @$(".title")
|
||||
@
|
||||
threadSelected: (event) ->
|
||||
event.preventDefault()
|
||||
@@ -25,3 +26,6 @@ class @ThreadListItemView extends Backbone.View
|
||||
|
||||
addComment: =>
|
||||
@$(".comments-count").html(parseInt(@$(".comments-count").html()) + 1)
|
||||
|
||||
highlight: (el) ->
|
||||
el.html(el.html().replace(/<mark>/g, "<mark>").replace(/<\/mark>/g, "</mark>"))
|
||||
|
||||
Reference in New Issue
Block a user