Presence start-end tooltip #1066

This commit is contained in:
jokob-sk
2025-05-24 09:38:02 +10:00
parent 3830b00c33
commit 84d8363383
5 changed files with 19 additions and 7 deletions

View File

@@ -219,9 +219,8 @@ function initializeCalendar() {
},
eventRender: function (event, element) {
$(element).tooltip({container: 'body', placement: 'bottom',
title: event.tooltip});
// element.attr ('title', event.tooltip); // Alternative tooltip
// $(element).tooltip({container: 'body', placement: 'bottom', title: event.tooltip});
element.attr ('title', event.tooltip); // Alternative tooltip
},
loading: function( isLoading, view ) {

View File

@@ -54,14 +54,14 @@
// Date
{targets: [1,2],
"createdCell": function (td, cellData, rowData, row, col) {
console.log(cellData);
// console.log(cellData);
if (!cellData.includes("missing event") && !cellData.includes("..."))
{
if (cellData.includes("+")) { // Check if timezone offset is present
cellData = cellData.split('+')[0]; // Remove timezone offset
}
console.log(cellData);
// console.log(cellData);
result = localizeTimestamp(cellData);
} else
{

5
front/lib/popper_tooltip/popper.min.js vendored Executable file

File diff suppressed because one or more lines are too long

View File

@@ -42,6 +42,7 @@
<script src="lib/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="lib/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<script src="lib/datatables.net/js/dataTables.select.min.js"></script>
<script src="lib/popper_tooltip/popper.min.js"></script>
<script src="js/common.js?v=<?php include 'php/templates/version.php'; ?>"></script>
<script src="js/modal.js?v=<?php include 'php/templates/version.php'; ?>"></script>

View File

@@ -324,8 +324,15 @@ function initializeCalendar () {
},
eventRender: function (event, element, view) {
$(element).tooltip({container: 'body', placement: 'bottom', title: event.tooltip});
// element.attr ('title', event.tooltip); // Alternative tooltip
// $(element).tooltip({container: 'body', placement: 'bottom', title: event.tooltip});
tltp = event.tooltip.replace('\n',' | ')
element.attr ('title', tltp); // Alternative tooltip
},
eventClick: function(info) {
console.log(info);
},
loading: function( isLoading, view ) {