summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/diff/box.tmpl9
1 files changed, 6 insertions, 3 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl
index 8ee4a001ce..9445e7846c 100644
--- a/templates/repo/diff/box.tmpl
+++ b/templates/repo/diff/box.tmpl
@@ -133,16 +133,19 @@
{{if .IsSplitStyle}}
<script>
(function() {
- $('.add-code').each(function() {
+ $('tr.add-code').each(function() {
var prev = $(this).prev();
if(prev.is('.del-code') && prev.children().eq(3).text().trim() === '') {
while(prev.prev().is('.del-code') && prev.prev().children().eq(3).text().trim() === '') {
prev = prev.prev();
}
- prev.children().eq(3).html($(this).children().eq(3).html());
prev.children().eq(2).html($(this).children().eq(2).html());
- prev.children().eq(3).addClass('add-code');
+ prev.children().eq(3).html($(this).children().eq(3).html());
+
+ prev.children().eq(0).addClass('del-code');
+ prev.children().eq(1).addClass('del-code');
prev.children().eq(2).addClass('add-code');
+ prev.children().eq(3).addClass('add-code');
$(this).remove();
}
});