minor changes
This commit is contained in:
@@ -77,8 +77,8 @@ def get_threads(request, course_id, discussion_id):
|
||||
query_params = {
|
||||
'page': request.GET.get('page', 1),
|
||||
'per_page': THREADS_PER_PAGE, #TODO maybe change this later
|
||||
'sort_key': request.GET.get('sort_key', ''),
|
||||
'sort_order': request.GET.get('sort_order', ''),
|
||||
'sort_key': request.GET.get('sort_key', 'date'),
|
||||
'sort_order': request.GET.get('sort_order', 'desc'),
|
||||
'text': request.GET.get('text', ''),
|
||||
'tags': request.GET.get('tags', ''),
|
||||
}
|
||||
|
||||
@@ -102,6 +102,7 @@ $ ->
|
||||
replaceMath: (text) ->
|
||||
text = text.replace /@@(\d+)@@/g, ($0, $1) => @math[$1]
|
||||
@math = null
|
||||
console.log text
|
||||
text
|
||||
|
||||
@replaceMathWrapper: (_this) ->
|
||||
@@ -110,11 +111,11 @@ $ ->
|
||||
if Markdown?
|
||||
|
||||
Markdown.getMathCompatibleConverter = ->
|
||||
converter = Markdown.getSanitizingConverter()
|
||||
processor = new MathJaxProcessor()
|
||||
converter.hooks.chain "preConversion", MathJaxProcessor.removeMathWrapper(processor)#processor.removeMath
|
||||
converter.hooks.chain "postConversion", MathJaxProcessor.replaceMathWrapper(processor)#.replaceMath
|
||||
converter
|
||||
converter = Markdown.getSanitizingConverter()
|
||||
processor = new MathJaxProcessor()
|
||||
converter.hooks.chain "preConversion", MathJaxProcessor.removeMathWrapper(processor)
|
||||
converter.hooks.chain "postConversion", MathJaxProcessor.replaceMathWrapper(processor)
|
||||
converter
|
||||
|
||||
Markdown.makeWmdEditor = (elem, appended_id, imageUploadUrl) ->
|
||||
$elem = $(elem)
|
||||
|
||||
@@ -87,8 +87,6 @@ initializeFollowThread = (thread) ->
|
||||
$discussionContent.attr("status", "normal")
|
||||
)
|
||||
|
||||
handleUnvote = (elem) ->
|
||||
|
||||
handleVote = (elem, value) ->
|
||||
contentType = if $content.hasClass("thread") then "thread" else "comment"
|
||||
url = Discussion.urlFor("#{value}vote_#{contentType}", id)
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
MathJax.Hub.Config({
|
||||
tex2jax: {
|
||||
inlineMath: [
|
||||
["$","$"],
|
||||
["\\(","\\)"],
|
||||
],
|
||||
displayMath: [
|
||||
["$$","$$"],
|
||||
["\\[","\\]"],
|
||||
]
|
||||
}
|
||||
});
|
||||
@@ -19,6 +19,7 @@
|
||||
## This must appear after all mathjax-config blocks, so it is after the imports from the other templates.
|
||||
## It can't be run through static.url because MathJax uses crazy url introspection to do lazy loading of MathJax extension libraries
|
||||
<script type="text/javascript" src="/static/js/vendor/mathjax-MathJax-c9db6ac/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"></script>
|
||||
<!---<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"> </script>-->
|
||||
<script type="text/javascript" src="${static.url('js/split.js')}"></script>
|
||||
<script type="text/javascript" src="${static.url('js/jquery.ajaxfileupload.js')}"></script>
|
||||
<script type="text/javascript" src="${static.url('js/Markdown.Converter.js')}"></script>
|
||||
|
||||
Reference in New Issue
Block a user