From cd164793ccd27ea316a05c70a12eaea1cdf53ae3 Mon Sep 17 00:00:00 2001 From: Jokob-sk Date: Tue, 25 Jul 2023 06:43:15 +1000 Subject: [PATCH] presence #294 work + setings improvements --- front/deviceDetails.php | 12 +++++++++++- front/php/templates/language/lang.php | 4 ++++ front/presence.php | 2 +- front/settings.php | 2 +- pialert/flows/unmark_new.json | 0 5 files changed, 17 insertions(+), 3 deletions(-) mode change 100644 => 100755 pialert/flows/unmark_new.json diff --git a/front/deviceDetails.php b/front/deviceDetails.php index a72bdc62..cd4a3f92 100755 --- a/front/deviceDetails.php +++ b/front/deviceDetails.php @@ -1232,6 +1232,16 @@ function initializeCalendar () { duration : { month: 1 }, buttonText : '', columnHeaderFormat : 'D' + }, + agendaWeek: { + buttonText : '', + }, + agendaDay: { + type : 'agenda', + duration : { day: 1 }, + buttonText : '', + slotLabelFormat : 'H', + slotDuration : '01:00:00' } }, @@ -1278,7 +1288,7 @@ function initializeCalendar () { }, eventRender: function (event, element) { - $(element).tooltip({container: 'body', placement: 'right', + $(element).tooltip({container: 'body', placement: 'bottom', title: event.tooltip}); // element.attr ('title', event.tooltip); // Alternative tooltip }, diff --git a/front/php/templates/language/lang.php b/front/php/templates/language/lang.php index 6bd1ecd3..f3dcd3a5 100755 --- a/front/php/templates/language/lang.php +++ b/front/php/templates/language/lang.php @@ -56,6 +56,10 @@ function lang($key) // if found, use default language $temp = $lang[$defaultLang][$key]; + } elseif (strpos($key, "__metadata") !== false) { + // If the key contains "__metadata", handle it here. + // You can set a specific value or perform some other action for these keys. + $temp = "__metadata"; } else { // String not found in the default or selected language diff --git a/front/presence.php b/front/presence.php index bdc28d25..8e80b28e 100755 --- a/front/presence.php +++ b/front/presence.php @@ -332,7 +332,7 @@ function initializeCalendar () { }, eventRender: function (event, element, view) { - $(element).tooltip({container: 'body', placement: 'right', title: event.tooltip}); + $(element).tooltip({container: 'body', placement: 'bottom', title: event.tooltip}); // element.attr ('title', event.tooltip); // Alternative tooltip }, diff --git a/front/settings.php b/front/settings.php index 72d55c69..6a53c9f5 100755 --- a/front/settings.php +++ b/front/settings.php @@ -305,7 +305,7 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) { // "test" => [lang("settings_event_tooltip"),""] // ]; - if(count($eventsList) > 0) + if(count($eventsList) > 0 && $set['Type'] != 'json') { foreach ($eventsList as $event) { $eventsHtml = $eventsHtml.'