{% load i18n %} function listCommitDetails(url, t) { $.modal('
', {autoResize:true}); $('#simplemodal-container').css({'width':'auto', 'height':'auto'}); $.ajax({ url: url, dataType: 'json', cache: false, success: function(data) { var heading = '

' + "{% trans "Modification Details" %}" + '

'; var time = '

' + t + '

'; var con = ''; function show(data_, hd) { if (data_.length > 0) { con += '

' + hd + '

'; con += ''; } } show(data['new'], "{% trans "New files" %}"); show(data['removed'], "{% trans "Deleted files" %}"); show(data['renamed'], "{% trans "Renamed or Moved files" %}"); show(data['modified'], "{% trans "Modified files" %}"); show(data['newdir'], "{% trans "New directories" %}"); show(data['deldir'], "{% trans "Deleted directories" %}"); if (!con) { if (data['cmt_desc']) { con = '

' + HTMLescape(data['cmt_desc']) + '

'; } } $('#ls-ch').html(heading + time + con); $(window).resize(); }, error: function() { $('#ls-ch').html("{% trans "Unknown error." %}"); setTimeout(function() { $.modal.close(); }, 2500); } }); } $('.lsch').click(function() { listCommitDetails($(this).data('url'), $(this).data('time')); return false; });