From 7b294b09787f0ddd46f68e5154d87c47e86d7760 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Fri, 11 Sep 2009 09:21:24 +0000 Subject: [PATCH] 2009-09-11 Miguel de Dios MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * godmode/alerts/alert_list.php: fix bug in "Alerts » Manage alerts" when you choose the agent the module select did'nt change to enable. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1932 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++ pandora_console/godmode/alerts/alert_list.php | 33 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 10d58b43e3..1ae15bc64a 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2009-09-11 Miguel de Dios + + * godmode/alerts/alert_list.php: fix bug in "Alerts » Manage alerts" when + you choose the agent the module select did'nt change to enable. + 2009-09-09 Sancho Lerena * operation/agentes/estado_monitores.php: Main view now also show last diff --git a/pandora_console/godmode/alerts/alert_list.php b/pandora_console/godmode/alerts/alert_list.php index 77e7a8c756..74cc64b1f0 100644 --- a/pandora_console/godmode/alerts/alert_list.php +++ b/pandora_console/godmode/alerts/alert_list.php @@ -560,6 +560,39 @@ $(document).ready (function () { } ); + + $("#text-id_agent").result ( + function () { + selectAgent = true; + var agent_name = this.value; + $('#id_agent_module').fadeOut ('normal', function () { + $('#id_agent_module').empty (); + var inputs = []; + inputs.push ("agent_name=" + agent_name); + inputs.push ("get_agent_modules_json=1"); + inputs.push ("page=operation/agentes/ver_agente"); + jQuery.ajax ({ + data: inputs.join ("&"), + type: 'GET', + url: action="ajax.php", + timeout: 10000, + dataType: 'json', + success: function (data) { + $('#id_agent_module').append ($('').attr ('value', 0).text ("--")); + jQuery.each (data, function (i, val) { + s = html_entity_decode (val['nombre']); + $('#id_agent_module').append ($('').attr ('value', val['id_agente_modulo']).text (s)); + }); + $('#id_agent_module').enable(); + $('#id_agent_module').fadeIn ('normal'); + } + }); + }); + + + } + ); + //---------------------------- $("#text-agent_name").autocomplete ("ajax.php", {