mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 13:28:25 +00:00 
			
		
		
		
	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>
This commit is contained in:
		@@ -200,7 +200,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	{{if .IsSplitStyle}}
 | 
						{{if .IsSplitStyle}}
 | 
				
			||||||
		<script>
 | 
							<script>
 | 
				
			||||||
			(function() {
 | 
								document.addEventListener('DOMContentLoaded', function() {
 | 
				
			||||||
				$('tr.add-code').each(function() {
 | 
									$('tr.add-code').each(function() {
 | 
				
			||||||
					var prev = $(this).prev();
 | 
										var prev = $(this).prev();
 | 
				
			||||||
					if(prev.is('.del-code') && prev.children().eq(3).text().trim() === '') {
 | 
										if(prev.is('.del-code') && prev.children().eq(3).text().trim() === '') {
 | 
				
			||||||
@@ -217,7 +217,7 @@
 | 
				
			|||||||
						$(this).remove();
 | 
											$(this).remove();
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				});
 | 
									});
 | 
				
			||||||
			}());
 | 
								});
 | 
				
			||||||
		</script>
 | 
							</script>
 | 
				
			||||||
	{{end}}
 | 
						{{end}}
 | 
				
			||||||
{{end}}
 | 
					{{end}}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user