calendar: update popover content when shown (#4045)

This commit is contained in:
Kevin Papst
2023-05-22 18:41:30 +02:00
committed by GitHub
parent 97092acae9
commit 2681b81990
6 changed files with 19 additions and 11 deletions

View File

@@ -220,15 +220,23 @@ export default class KimaiCalendar {
}
const element = mouseEnterInfo.el;
let popover = Popover.getInstance(element);
const popoverTitle = DATES.getFormattedDate(event.start) + ' | ' + DATES.formatTime(event.start) + ' - ' + (event.end ? DATES.formatTime(event.end) : '');
const popoverContent = this.renderEventPopoverContent(event);
if (popover === null) {
let popover = Popover.getInstance(element);
if (popover !== null) {
// see https://github.com/kimai/kimai/issues/4043
popover.setContent({
'.popover-header': popoverTitle,
'.popover-body': popoverContent
});
} else {
// https://getbootstrap.com/docs/5.0/components/popovers/#options
popover = new Popover(element, {
title: DATES.getFormattedDate(event.start) + ' | ' + DATES.formatTime(event.start) + ' - ' + (event.end ? DATES.formatTime(event.end) : ''),
title: popoverTitle,
placement: 'top',
html: true,
content: this.renderEventPopoverContent(event),
content: popoverContent,
trigger: 'focus',
});
}

File diff suppressed because one or more lines are too long

View File

@@ -45,7 +45,7 @@
"calendar": {
"js": [
"/build/runtime.f0079159.js",
"/build/calendar.198a5c2b.js"
"/build/calendar.25b368b9.js"
],
"css": [
"/build/calendar.bb473428.css"
@@ -72,7 +72,7 @@
"/build/invoice-pdf.ce9aace0.js": "sha384-mtZkXrpsXFMX2YvmmTlCm91QgsTlZLzLJnDAFcTuBDtDZ7TNkqLYkfCeLzFLVfwb",
"/build/invoice-pdf.2b749265.css": "sha384-DXXgkz2WWnrWnfBnXX5fmfPQSPb98upMnWxYKwTGYS04EhrPIWfDCutB2unIrWh7",
"/build/chart.f5becfac.js": "sha384-GSqETm8wULiVXyizvwRompfwu63r/C0Qd/AvrHDE4cqAKiIGCssb3QyBtGu1WN+W",
"/build/calendar.198a5c2b.js": "sha384-Rx1eiPfZeAO2iapu94+f3xx4tjj7xbtkUaZwycaxMU+v/bYLjAJIL+VSjiBPYnTg",
"/build/calendar.25b368b9.js": "sha384-jKqj+OqQVIm8TXCEmnRveqG3348yVwvlb0k88kRn90DZGzbthjToMHUb5pwL/TtI",
"/build/calendar.bb473428.css": "sha384-900W9o8666Qpw21rLP7hn5Ql8tWd40k0IcE3QpFm7E7V6bKva7xQgGlyzVuuh4GK",
"/build/dashboard.6774a712.js": "sha384-lBwkNqUPv+IBbznagiFakY2BOIueq/Bg89wHO2XeM9YAZ51rPkrvdMd+XmFupHsM",
"/build/dashboard.18f5a8b7.css": "sha384-PBD8ftb2yBoSjRe2sN5Xb4dEz045kOEUfcIufdSis+tWoWdAx5j4Yic+F/6CYbrP"

View File

@@ -9,7 +9,7 @@
"build/invoice-pdf.js": "/build/invoice-pdf.ce9aace0.js",
"build/chart.js": "/build/chart.f5becfac.js",
"build/calendar.css": "/build/calendar.bb473428.css",
"build/calendar.js": "/build/calendar.198a5c2b.js",
"build/calendar.js": "/build/calendar.25b368b9.js",
"build/dashboard.css": "/build/dashboard.18f5a8b7.css",
"build/dashboard.js": "/build/dashboard.6774a712.js",
"build/runtime.js": "/build/runtime.f0079159.js"

View File

@@ -17,11 +17,11 @@ class Constants
/**
* The current release version
*/
public const VERSION = '2.0.23';
public const VERSION = '2.0.24';
/**
* The current release: major * 10000 + minor * 100 + patch
*/
public const VERSION_ID = 20023;
public const VERSION_ID = 20024;
/**
* The software name
*/