Commit b8d2438a by Awais Committed by Awais Qureshi

Fixing bug for track changes issue.

ECOM-7861
parent 4c5518ac
......@@ -38,8 +38,15 @@ function showDiff($object, $historyObject, $outputDiv) {
}
function showDiffCourseDetails(currentObject, historyObject, $outputDiv) {
var d = dmp.diff_main(currentObject, historyObject);
dmp.diff_cleanupEfficiency(d);
$outputDiv.html(decodeEntities(dmp.diff_prettyHtml(d)));
$outputDiv.show();
if (currentObject != historyObject) {
var d = dmp.diff_main(currentObject, historyObject);
dmp.diff_cleanupSemantic(d);
$outputDiv.html(decodeEntities(dmp.diff_prettyHtml(d)));
$outputDiv.show();
}
else
{
$outputDiv.html(decodeEntities(currentObject));
$outputDiv.show();
}
}
......@@ -46,7 +46,8 @@ function loadRevisionHistory(revisionUrl) {
currentObject = $('.history-field-container').find('.' + key);
if (currentObject.length && value != null) {
currentObjectText = getComparableText(currentObject);
value = $($.parseHTML(value)).text().trim();
value = decodeEntities(value);
currentObjectText = decodeEntities(currentObjectText);
showDiffCourseDetails(value, currentObjectText, currentObject.siblings('.show-diff'));
currentObject.hide();
}
......
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