From d2174194c964a4639b6cfde517d37f2128ff2685 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 29 Apr 2024 15:40:11 +0200 Subject: [PATCH] #13625 fix traps hints and url --- .../include/class/SnmpConsole.class.php | 8 +-- pandora_console/include/functions_ui.php | 6 +-- pandora_console/include/javascript/pandora.js | 50 +++++++++---------- pandora_console/include/styles/pandora.css | 4 ++ 4 files changed, 34 insertions(+), 34 deletions(-) diff --git a/pandora_console/include/class/SnmpConsole.class.php b/pandora_console/include/class/SnmpConsole.class.php index f564b6599d..fefce2e54f 100644 --- a/pandora_console/include/class/SnmpConsole.class.php +++ b/pandora_console/include/class/SnmpConsole.class.php @@ -521,7 +521,7 @@ class SnmpConsole extends HTML $legend .= '
'; $legend .= html_print_image('images/delete.svg', true, ['class' => 'main_menu_icon invert_filter']).' - '.__('Delete'); $legend .= '
'; - $legend .= ''; + $legend .= ''; echo '
'; @@ -778,11 +778,11 @@ class SnmpConsole extends HTML // SNMP Agent. $agent = agents_get_agent_with_ip($tmp->source); if ($agent === false) { - $tmp->snmp_agent .= 'source.'" title="'.__('Create agent').'">'.$tmp->source.''; + $tmp->snmp_agent .= ''.$tmp->source.''; } else { $tmp->snmp_agent .= '
'; - $tmp->snmp_agent .= ''.$agent['alias'].ui_print_help_tip($tmp->source, true); - '
'; + $tmp->snmp_agent .= ''.$agent['alias'].''.ui_print_help_tip($tmp->source, true); + ''; } // Enterprise string. diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 89e8c2d01b..ccd4659a63 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -2948,14 +2948,14 @@ function ui_print_help_tip( $text_title = (strlen($text) >= 60) ? substr($text, 0, 60).'...' : $text; $id = random_int(1, 99999); - $output = '
'; + $output = '
'; $output .= ''; $output .= html_print_image( $img, true, [ - 'title' => $text_title, - 'class' => $blink === true ? 'blink' : '', + 'title' => io_safe_output($text_title), + 'class' => ($blink === true) ? 'blink' : '', 'style' => 'width: 16px; height: 16px;', ], false, diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index 83fbf57d54..180fb592d5 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -2364,6 +2364,29 @@ var formatterDataVerticalBar = function(value, ctx) { } }; +function open_tip(id) { + $("#tip_dialog_" + id).dialog({ + title: $("#tip_dialog_" + id).data("title"), + modal: true, + maxWidth: 600, + minWidth: 400, + show: { + effect: "fade", + duration: 200 + }, + hide: { + effect: "fade", + duration: 200 + }, + closeOnEscape: true, + buttons: { + Close: function() { + $(this).dialog("close"); + } + } + }); +} + // Show about section $(document).ready(function() { $("[id^='icon_about']").click(function() { @@ -2457,33 +2480,6 @@ $(document).ready(function() { }); } } - - $("[id^='div_tip_']").click(function() { - var id = $(this) - .attr("id") - .split("_")[2]; - - $("#tip_dialog_" + id).dialog({ - title: $("#tip_dialog_" + id).data("title"), - modal: true, - maxWidth: 600, - minWidth: 400, - show: { - effect: "fade", - duration: 200 - }, - hide: { - effect: "fade", - duration: 200 - }, - closeOnEscape: true, - buttons: { - Close: function() { - $(this).dialog("close"); - } - } - }); - }); }); function close_info_box(id) { diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 0e9d68cd5c..8e340928f7 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -3653,6 +3653,10 @@ div.tip > img { margin-left: 10px; } +div.tip > div.invisible { + display: none !important; +} + /* * --------------------------------------------------------------------- * - SEARCH BOX in header -