2013-04-25 Miguel de Dios <miguel.dedios@artica.es>

* include/javascript/pandora.js: set the title for the large
	modules.
	
	Fixes: #3609509




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8055 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-04-25 09:14:51 +00:00
parent 9c3bd51fcc
commit dc569d5bbe
2 changed files with 47 additions and 16 deletions

View File

@ -1,3 +1,10 @@
2013-04-25 Miguel de Dios <miguel.dedios@artica.es>
* include/javascript/pandora.js: set the title for the large
modules.
Fixes: #3609509
2013-04-25 Miguel de Dios <miguel.dedios@artica.es> 2013-04-25 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_alerts.php, extensions/snmp_explorer.php, * extensions/agents_alerts.php, extensions/snmp_explorer.php,

View File

@ -199,14 +199,15 @@ function agent_changed_by_multiple_agents (event, id_agent, selected) {
} }
jQuery.post (homedir + '/ajax.php', jQuery.post (homedir + '/ajax.php',
{"page": "operation/agentes/ver_agente", {
"get_agent_modules_json_for_multiple_agents": 1, "page": "operation/agentes/ver_agente",
"id_agent[]": idAgents, "get_agent_modules_json_for_multiple_agents": 1,
"all": find_modules, "id_agent[]": idAgents,
"custom_condition": custom_condition, "all": find_modules,
"selection_mode": selection_mode, "custom_condition": custom_condition,
"serialized": serialized, "selection_mode": selection_mode,
"id_server": id_server "serialized": serialized,
"id_server": id_server
}, },
function (data) { function (data) {
$('#module').empty (); $('#module').empty ();
@ -218,17 +219,30 @@ function agent_changed_by_multiple_agents (event, id_agent, selected) {
noneText = 'None'; noneText = 'None';
} }
$('#module').append ($('<option></option>').html (noneText).attr ("None", "").attr('selected', true)); $('#module')
.append ($('<option></option>')
.html(noneText)
.attr ("None", "")
.attr('selected', true));
return; return;
} }
if (typeof($(document).data('text_for_module')) != 'undefined') { if (typeof($(document).data('text_for_module')) != 'undefined') {
$('#module').append ($('<option></option>').html ($(document).data('text_for_module')).attr("value", 0).attr('selected', true)); $('#module')
.append ($('<option></option>')
.html ($(document)
.data('text_for_module'))
.attr("value", 0)
.attr('selected', true));
} }
else { else {
if (typeof(data['any_text']) != 'undefined') { if (typeof(data['any_text']) != 'undefined') {
$('#module').append ($('<option></option>').html (data['any_text']).attr ("value", 0).attr('selected', true)); $('#module')
.append ($('<option></option>')
.html (data['any_text'])
.attr ("value", 0)
.attr('selected', true));
} }
else { else {
var anyText = $("#any_text").html(); //Trick for catch the translate text. var anyText = $("#any_text").html(); //Trick for catch the translate text.
@ -237,14 +251,24 @@ function agent_changed_by_multiple_agents (event, id_agent, selected) {
anyText = 'Any'; anyText = 'Any';
} }
$('#module').append ($('<option></option>').html (anyText).attr ("value", 0).attr('selected', true)); $('#module')
.append ($('<option></option>')
.html (anyText)
.attr ("value", 0)
.attr('selected', true));
} }
} }
jQuery.each (data, function (i, val) { jQuery.each (data, function (i, val) {
s = js_html_entity_decode(val); s = js_html_entity_decode(val);
$('#module').append ($('<option></option>').html (s).attr ("value", i));
$('#module').fadeIn ('normal'); $('#module')
}); .append ($('<option></option>')
.html (s)
.attr ("value", i)
.attr("title", i));
$('#module').fadeIn ('normal');
});
if (selected != undefined) if (selected != undefined)
$('#module').attr ('value', selected); $('#module').attr ('value', selected);
$('#module').css ("width", "auto"); $('#module').css ("width", "auto");