From 672faae01107ec445c3ada3079579341bee5ec7d Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 22 Apr 2010 11:58:17 +0000 Subject: [PATCH] 2010-04-22 Miguel de Dios * include/javascript/pandora.js: erased trace line in the source of function "agent_changed", and force to select by default the none option. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2586 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/include/javascript/pandora.js | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 028c5ab345..b359b2fe19 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2010-04-22 Miguel de Dios + + * include/javascript/pandora.js: erased trace line in the source of function + "agent_changed", and force to select by default the none option. + 2010-04-22 Miguel de Dios * include/javascript/pandora.js: changed function "agent_changed" for take diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index ed12ffff61..37347ab12e 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -75,14 +75,13 @@ function agent_changed (event, id_agent, selected) { "id_agent": id_agent }, function (data) { - console.log($(document).data('text_for_module')); $('#module').empty (); if (typeof($(document).data('text_for_module')) != 'undefined') { - $('#module').append ($('').html ($(document).data('text_for_module')).attr ("value", 0)); + $('#module').append ($('').html ($(document).data('text_for_module')).attr("value", 0).attr('selected', true)); } else { - $('#module').append ($('').html (data['any_text']).attr ("value", 0)); + $('#module').append ($('').html (data['any_text']).attr ("value", 0).attr('selected', true)); } jQuery.each (data, function (i, val) { s = js_html_entity_decode (val['nombre']);