Skip to content

Commit 47a4229

Browse files
committed
Fix wrong layout of subtickets with Trac 1.4 or later
1 parent a68e82f commit 47a4229

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
jQuery(function(){
2-
const anchor = document.getElementById('ticket');
3-
if (!anchor) {
4-
return;
1+
jQuery(function($) {
2+
var ticketbox = document.getElementById('ticketbox');
3+
if (ticketbox === null)
4+
ticketbox = document.getElementById('ticket');
5+
if (ticketbox !== null) {
6+
var div = $(document.createElement('div'));
7+
div.html(subtickets_div);
8+
$(ticketbox).append(div.contents());
59
}
6-
7-
const div = document.createElement('div');
8-
div.innerHTML = subtickets_div;
9-
10-
anchor.appendChild(div);
1110
});

0 commit comments

Comments
 (0)