From 6ccbc87cbb77fa0d543f51c3f22e31919762785c Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Wed, 12 Mar 2014 11:06:06 +0000 Subject: [PATCH] 2014-03-12 Miguel de Dios * godmode/agentes/module_manager_editor_plugin.php, include/javascript/pandora_modules.js: fixed the automagic deletion of macros when load a component. Incident: #654 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9565 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 ++++++++ .../godmode/agentes/module_manager_editor_plugin.php | 8 +++++++- pandora_console/include/javascript/pandora_modules.js | 9 ++++++--- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 1cb8248a27..b397719c88 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2014-03-12 Miguel de Dios + + * godmode/agentes/module_manager_editor_plugin.php, + include/javascript/pandora_modules.js: fixed the automagic deletion + of macros when load a component. + + Incident: #654 + 2014-03-11 Sergio Martin * include/functions_graph.php: Change the unknown mode diff --git a/pandora_console/godmode/agentes/module_manager_editor_plugin.php b/pandora_console/godmode/agentes/module_manager_editor_plugin.php index b9957b2e34..c574ec2857 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_plugin.php +++ b/pandora_console/godmode/agentes/module_manager_editor_plugin.php @@ -87,13 +87,14 @@ if (!empty($macros)) { $data[1] = html_print_input_text($m['macro'], $m['value'], '', 100, 255, true); $table_simple->colspan['macro'.$m['macro']][1] = 3; $table_simple->rowclass['macro'.$m['macro']] = 'macro_field'; - + push_table_simple ($data, 'macro'.$m['macro']); } } ?> diff --git a/pandora_console/include/javascript/pandora_modules.js b/pandora_console/include/javascript/pandora_modules.js index 705133ed3e..c5f190a02a 100644 --- a/pandora_console/include/javascript/pandora_modules.js +++ b/pandora_console/include/javascript/pandora_modules.js @@ -224,7 +224,7 @@ function configure_modules_form () { }); network_component_group_change_event(); - + $("#network_component").change (function () { if (this.value == 0) return; @@ -327,8 +327,11 @@ function configure_modules_form () { } } - // Delete macro fields - $('.macro_field').remove(); + if (!load_module_component) { + // Delete macro fields + $('.macro_field').remove(); + } + load_module_component = false; $('#hidden-macros').val('');