From ac61a3a226db906d115a9a337f25e197e8966eb2 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Thu, 12 Jun 2014 09:41:29 +0000 Subject: [PATCH] 2014-06-12 Sergio Martin * godmode/massive/massive_copy_modules.php: Delete the source agent from the target agents lists in massive copy form to avoid errors for ticket: #869 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10171 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/godmode/massive/massive_copy_modules.php | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index b798c71757..694e032c6f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2014-06-12 Sergio Martin + + * godmode/massive/massive_copy_modules.php: Delete the + source agent from the target agents lists in massive + copy form to avoid errors for ticket: #869 + 2014-06-11 Sergio Martin * include/functions.php: Change incorrect color assigned to diff --git a/pandora_console/godmode/massive/massive_copy_modules.php b/pandora_console/godmode/massive/massive_copy_modules.php index 7ee5130484..4b3131793b 100644 --- a/pandora_console/godmode/massive/massive_copy_modules.php +++ b/pandora_console/godmode/massive/massive_copy_modules.php @@ -252,10 +252,9 @@ $(document).ready (function () { }, loading: "#destiny_agent_loading", callbackPost: function (id, value, option) { - if ($("#source_id_agent").fieldValue ().in_array (id)) { - /* Hide source agent */ - $(option).hide (); - } + /* Hide source agent */ + var selected_agent = $("#source_id_agent").val(); + $("#destiny_id_agent option[value='" + selected_agent + "']").remove(); } }); @@ -374,6 +373,8 @@ $(document).ready (function () { }, "json" ); + // Refresh selectable agents to delete the selected one + $("#destiny_id_group").trigger("change"); }, "json" );