From c725624dcb65b29ffe3a2922812f86fba52abc08 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 20 Feb 2024 16:16:48 +0100 Subject: [PATCH] #12621 style tips dialogs --- .../godmode/agentes/module_manager_editor_common.php | 2 +- pandora_console/godmode/setup/setup_general.php | 2 +- pandora_console/godmode/setup/setup_visuals.php | 2 +- pandora_console/include/functions_ui.php | 4 +++- pandora_console/include/javascript/pandora.js | 1 + 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index 8052aa9868..f44c7295f6 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -1370,7 +1370,7 @@ $table_advanced->data['title_4'] = html_print_subtitle_table(__('Data and their $table_advanced->rowclass['caption_process_unit'] = 'w50p'; $table_advanced->rowclass['process_unit'] = 'w50p'; $table_advanced->data['caption_process_unit'][0] = __('Unit'); -$table_advanced->data['caption_process_unit'][1] = __('Post process'); +$table_advanced->data['caption_process_unit'][1] = __('Post process').ui_print_help_tip(__('It allows you to change the unit of the received data. To do this, multiply the data received by the value set in this option (e.g. Seconds * 0.016666666667 = Minutes). The data is saved already transformed in the database, so changing this parameter when the module has data can cause anomalies in graphs and other elements.'), true); $table_advanced->data['process_unit'][0] = html_print_extended_select_for_unit( 'unit', $unit, diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php index 49c7bfba4d..1b32ea727c 100644 --- a/pandora_console/godmode/setup/setup_general.php +++ b/pandora_console/godmode/setup/setup_general.php @@ -417,7 +417,7 @@ $table->data[$i][] = html_print_label_input_block( ); $table->data[$i++][] = html_print_label_input_block( - __('Enable Feedback').ui_print_help_tip(__(' It enables the "give feedback" window in the help menu at the top right.'), true), + __('Enable Feedback').ui_print_help_tip(__(' It enables the \'give feedback\' window in the help menu at the top right.'), true), html_print_checkbox_switch_extended( 'activate_feedback', true, diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index e561a69cee..586f361de0 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -1809,7 +1809,7 @@ $table_other->data[$row][] = html_print_label_input_block( ); $table_other->data[$row][] = html_print_label_input_block( - __('Date format string')ui_print_help_tip(__('It uses a unix datetime format definition string.'), true), + __('Date format string').ui_print_help_tip(__('It uses a unix datetime format definition string.'), true), html_print_input_text( 'date_format', $config['date_format'], diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index baa6416cd2..d2a704ca8c 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -2940,6 +2940,8 @@ function ui_print_help_tip( $img = 'images/info@svg.svg'; } + $text_title = (strlen($text) >= 60) ? substr($text, 0, 60).'...' : $text; + $id = random_int(1, 99999); $output = '
'; $output .= ''; @@ -2947,7 +2949,7 @@ function ui_print_help_tip( $img, true, [ - 'title' => $text, + 'title' => $text_title, 'class' => $blink === true ? 'blink' : '', 'style' => 'width: 16px; height: 16px;', ], diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index 00b05ee353..aa64034e74 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -2459,6 +2459,7 @@ $(document).ready(function() { $("#tip_dialog_" + id).dialog({ title: $("#tip_dialog_" + id).data("title"), modal: true, + maxWidth: 600, show: { effect: "fade", duration: 200