feat(schedule): try to improve usablity of modal info popover

This commit is contained in:
Andreas Hubel 2024-02-03 01:44:45 +01:00
parent b6d80d2dd0
commit 47c9bfc433
No known key found for this signature in database
GPG key ID: 1291899EC534ECDE
2 changed files with 6 additions and 3 deletions

View file

@ -45,7 +45,7 @@ body .schedule {
/* and now for small screens: */
@media (max-width: @screen-xs-max) {
/*height: 75px; disabled, at it did not work as expected --Andi */
/*height: 75px; disabled, as it did not work as expected --Andi */
}
a:hover {
@ -182,7 +182,7 @@ body .schedule {
button.close {
position: absolute;
top: 0;
right: 0;
left: 0;
z-index: 2;
padding: .75rem 1.25rem;
color: inherit;

View file

@ -1,6 +1,8 @@
const h = HtmlSanitizer.SanitizeHtml
let previousTitle = "";
let lastClose = new Date().getTime();
function dragElement(elmnt) {
var pos1 = 0,
pos2 = 0,
@ -52,12 +54,13 @@ function closeEventDetails(e) {
document.getElementById("schedule-event-detail-popover").style.display =
"none";
window.scrollLock = false;
lastClose = new Date().getTime();
}
const acronym = window.location.pathname.split("/")[1];
function showEventDetails(e, data, force = false) {
if (!force && (data.type || previousTitle == data.title)) {
if (!force && (data.type || previousTitle == data.title || lastClose > new Date().getTime() - 5000) ){
return;
}
let popover = document.getElementById("schedule-event-detail-popover");