Parcourir la source

Fix Split-View line adjustment (#4622)

The $-function is unreachable in the previous implementation because jQuery is
not loaded yet. I fix this by executing the function after the content is
loaded, so jQuery is loaded at the time of execution and the call will not fail
anymore.

Signed-off-by: Felix Nehrke <felix@nehrke.info>
tags/v1.6.0-dev
nemoinho il y a 5 ans
Parent
révision
0e04a2091a
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2
    2
      templates/repo/diff/box.tmpl

+ 2
- 2
templates/repo/diff/box.tmpl Voir le fichier

@@ -200,7 +200,7 @@

{{if .IsSplitStyle}}
<script>
(function() {
document.addEventListener('DOMContentLoaded', function() {
$('tr.add-code').each(function() {
var prev = $(this).prev();
if(prev.is('.del-code') && prev.children().eq(3).text().trim() === '') {
@@ -217,7 +217,7 @@
$(this).remove();
}
});
}());
});
</script>
{{end}}
{{end}}

Chargement…
Annuler
Enregistrer