Commit 549ef1cc by tasawernawaz Committed by Tasawer Nawaz

minor refactoring

parent 5b628816
......@@ -12,11 +12,12 @@ $(document).on('click', '.btn-show-changes', function (e) {
}
});
var dmp =new diff_match_patch();
function showDiff($object, $historyObject, $outputDiv) {
var d = dmp.diff_main($object.text(), $historyObject.text());
$outputDiv.html(dmp.diff_prettyHtml(d));
$object.hide();
}
var dmp = new diff_match_patch();
function showDiff($object, $historyObject, $outputDiv) {
var d = dmp.diff_main($.trim($object.text()), $.trim($historyObject.text()));
$outputDiv.html(dmp.diff_prettyHtml(d));
$object.hide();
$outputDiv.show();
}
{% extends 'base.html' %}
{% load i18n %}
{% load staticfiles %}
{% load compress %}
{% block title %}
{% trans "Revision History" %}
{% endblock title %}
......
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