From 32b0e504aac92717d661a69408902f5eeb73f319 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Mon, 16 Jan 2017 12:05:36 +0100 Subject: [PATCH] Change hover text in vconsole, full text in bbdd but show truncate - #13 --- .../include/functions_visual_map.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 90c5c86089..fb6680965c 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -121,8 +121,9 @@ function visual_map_print_item($mode = "read", $layoutData, $left = $left * $proportion['proportion_width']; } - - $text = '' . $label . ''; + $agentname = agents_get_name(agents_get_module_id ($id_module)); + $label = str_replace($agentname,ui_print_truncate_text($agentname, 'agent_small', false, true, false, '…', false),$label); + $text = '' . $label .''; if (!isset($layoutData['status_calculated'])) { $layoutData['status_calculated'] = @@ -1434,16 +1435,16 @@ function visual_map_process_wizard_add_modules ($id_modules, $image, switch ($label_type) { case 'agent_module': default: - $agent_label = ui_print_truncate_text(agents_get_name ($id_agent), 'agent_small', false, true, false, '…', false); - $module_label = ui_print_truncate_text(modules_get_agentmodule_name($id_module), 'module_small', false, true, false, '…', false); + $agent_label = agents_get_name ($id_agent); + $module_label = modules_get_agentmodule_name($id_module); $label = '

'.$agent_label . " - " . $module_label.'

'; break; case 'module': - $module_label = ui_print_truncate_text(modules_get_agentmodule_name($id_module), 'module_small', false, true, false, '…', false); + $module_label = modules_get_agentmodule_name($id_module); $label = '

'.$module_label.'

'; break; case 'agent': - $agent_label = ui_print_truncate_text(agents_get_name ($id_agent), 'agent_small', false, true, false, '…', false); + $agent_label = agents_get_name ($id_agent); $label = '

'.$agent_label.'

'; break; case 'none': @@ -1635,9 +1636,8 @@ function visual_map_process_wizard_add_agents ($id_agents, $image, switch ($label_type) { case 'agent': - $agent_label = ui_print_truncate_text( - agents_get_name($id_agent), - 'agent_small', false, true, false, '…', false); + $agent_label = + agents_get_name($id_agent); $label = $agent_label; break; case 'none':