Commit eefb6eab by aamishbaloch Committed by Aamish Baloch

YONK-643 Hyperlink is showing as text for learners is fixed.

parent 80126fc7
......@@ -165,6 +165,7 @@
$currentElement = this.$('.forum-nav-thread[data-id=' + threadId + ']');
active = $currentElement.has('.forum-nav-thread-link.is-active').length !== 0;
$currentElement.replaceWith($content);
this.convertMath($content);
this.showMetadataAccordingToSort();
if (this.supportsActiveThread && active) {
this.setActiveThread(threadId);
......@@ -215,12 +216,19 @@
return this;
};
DiscussionThreadListView.prototype.convertMath = function(element) {
if (typeof element !== 'undefined') {
DiscussionUtil.convertMath(element.find('.thread-preview-body'));
}
};
DiscussionThreadListView.prototype.renderThreads = function() {
var $content, thread, i, len;
this.$('.forum-nav-thread-list').empty();
for (i = 0, len = this.displayedCollection.models.length; i < len; i++) {
thread = this.displayedCollection.models[i];
$content = this.renderThread(thread);
this.convertMath($content);
this.$('.forum-nav-thread-list').append($content);
}
this.showMetadataAccordingToSort();
......
......@@ -54,7 +54,13 @@ var options = {
{pattern: 'common/js/xblock/runtime.v1.js', included: true},
{pattern: 'common/js/discussion/**/*.js', included: true},
{pattern: 'js/capa/src/**/*.js', included: true},
{pattern: 'js/src/**/*.js', included: true}
{pattern: 'js/src/**/*.js', included: true},
{pattern: '../../lms/static/js/Markdown.Converter.js', included: true},
{pattern: '../../lms/static/js/Markdown.Editor.js', included: true},
{pattern: '../../lms/static/js/Markdown.Sanitizer.js', included: true},
{pattern: '../../lms/static/js/split.js', included: true},
{pattern: '../../lms/static/coffee/src/customwmd.js', included: true},
{pattern: '//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_SVG&delayStartupUntil=configured', included: true} // eslint-disable-line max-len
],
specFiles: [
......
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