Max height for timeline

This commit is contained in:
Raphael Michel
2026-07-27 22:12:13 +02:00
parent bcb8b0a85a
commit 442145bde4
2 changed files with 21 additions and 15 deletions
@@ -1,18 +1,20 @@
/*global $,gettext*/
/* global $,gettext */
$(function () {
if ($("div[data-lazy-id]").length == 0) {
return;
}
$.getJSON("widgets.json" + ($("select[name='subevent']").val() ? "?subevent=" + $("select[name='subevent']").val() : ""), function (data) {
$.each(data.widgets, function (k, v) {
$("[data-lazy-id=" + v.lazy + "]").removeClass("widget-lazy-loading");
$("[data-lazy-id=" + v.lazy + "] .widget").html(v.content);
});
});
});
if ($('div[data-lazy-id]').length == 0) {
return
}
$.getJSON('widgets.json' + ($('select[name=\'subevent\']').val() ? '?subevent=' + $('select[name=\'subevent\']').val() : ''), function (data) {
$.each(data.widgets, function (k, v) {
$('[data-lazy-id=' + v.lazy + ']').removeClass('widget-lazy-loading')
$('[data-lazy-id=' + v.lazy + '] .widget').html(v.content)
})
})
})
$(function () {
if ($("#logs_target").length == 0) {
return;
}
});
$('.timeline').each(function () {
let $tl = $(this)
let $first = $(this).find('.row:not(.text-muted)').first()
$tl.scrollTop($tl.scrollTop() + Math.max($first.position().top - 50, 0))
})
})
@@ -727,6 +727,10 @@ h1 .label {
}
.timeline {
max-height: 200px;
overflow-y: auto;
position: relative;
.col-date {
position: relative;
min-height: 1px;