From 8a9fbbac8b750a71fe8bb293bcb22dbf732cabf9 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 18 Dec 2023 16:32:39 +0100 Subject: [PATCH] #12515 event title ... over 300 characters --- pandora_console/include/functions_ui.php | 9 +++++++-- pandora_console/operation/events/events.php | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 3ea3e8a740..d6078c56a7 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -96,7 +96,8 @@ function ui_print_truncate_text( $showTextInTitle=true, $suffix='…', $style=false, - $forced_title=false + $forced_title=false, + $text_title='' ) { global $config; $truncate_at_end = false; @@ -211,7 +212,11 @@ function ui_print_truncate_text( } if ($forced_title === true) { - $truncateText = ''.$truncateText.''; + } else { + $truncateText = ''.$truncateText.''; + } } if ($return == true) { diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 4365ff6594..1b23f856b1 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -522,6 +522,7 @@ if (is_ajax() === true) { $tmp->event_title = $output_event_name; $tmp->b64 = base64_encode(json_encode($tmp)); $tmp->evento = $output_event_name; + $tmp->event_force_title = (strlen($output_event_name) >= 300) ? substr($output_event_name, 0, 300).'...' : $output_event_name; if (empty($tmp->module_name) === false) { $tmp->module_name = ui_print_truncate_text( @@ -783,6 +784,7 @@ if (is_ajax() === true) { '…', true, true, + $tmp->event_force_title ); $evn .= $tmp->evento.'';