2012-03-09 Miguel de Dios <miguel.dedios@artica.es>

* include/javascript/pandora.js, extensions/snmp_explorer.php,
	operation/users/user_edit.php,
	godmode/agentes/module_manager_editor_network.php,
	godmode/setup/setup_auth.php, godmode/gis_maps/configure_gis_map.php,
	godmode/massive/massive_edit_modules.php,
	godmode/modules/manage_network_components_form.php,
	godmode/reporting/visual_console_builder.editor.js: fixed enable a widget in
	javascript (because the new jquery library is more html standar).



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5732 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2012-03-09 11:47:56 +00:00
parent 3a7f5e1d9a
commit 1534e92475
10 changed files with 110 additions and 103 deletions

@ -1,3 +1,14 @@
2012-03-09 Miguel de Dios <miguel.dedios@artica.es>
* include/javascript/pandora.js, extensions/snmp_explorer.php,
operation/users/user_edit.php,
godmode/agentes/module_manager_editor_network.php,
godmode/setup/setup_auth.php, godmode/gis_maps/configure_gis_map.php,
godmode/massive/massive_edit_modules.php,
godmode/modules/manage_network_components_form.php,
godmode/reporting/visual_console_builder.editor.js: fixed enable a widget in
javascript (because the new jquery library is more html standar).
2012-03-09 Sergio Martin <sergio.martin@artica.es>
* include/graphs/flot/pandora.flot.js: Fixed a xAxis bad

@ -474,7 +474,7 @@ function snmp_changed_by_multiple_snmp (event, id_snmp, selected) {
}
if (selected != undefined)
$('#module').attr ('value', selected);
$('#module').attr ('disabled', 0);
$('#module').removeAttr('disabled');
},
"json"
);

@ -203,7 +203,7 @@ $(document).ready (function () {
$("#simple-field_snmpv3_row2").css("display", "none");
$("#simple-field_snmpv3_row3").css("display", "none");
$("input[name=active_snmp_v3]").val(0);
$("input[name=snmp_community]").attr("disabled", false);
$("input[name=snmp_community]").removeAttr('disabled');
}
});

@ -530,9 +530,9 @@ function refreshMapView() {
arrayControls = null;
arrayControls = Array('Navigation', 'PanZoom', 'MousePosition');
//TODO read too from field forms user.
/*TODO read too from field forms user.*/
inital_zoom = mapConnection['default_zoom_level'];
num_levels_zoom = mapConnection['num_zoom_levels'];
center_latitude = mapConnection['initial_latitude'];
@ -580,7 +580,7 @@ $("#text_id_agent").autocomplete(
$("#text_id_agent").result (
function () {
$("#button-add_agent").attr('disabled', false);
$("#button-add_agent").removeAttr('disabled');
}
);
@ -780,7 +780,7 @@ function deleteConnectionMap(idConnectionMap) {
}
}
checked = $("#radiobtn0001", $("#map_connection_" + idConnectionMap)).attr('checked')
checked = $("#radiobtn0001", $("#map_connection_" + idConnectionMap)).attr('checked');
$("#map_connection_" + idConnectionMap).remove();
if (checked) {
@ -868,7 +868,7 @@ function fillOrderField() {
}
function upLayer(idLayer) {
var toUpIndex = null
var toUpIndex = null;
var toDownIndex = null;
for (var index in layerList) {
@ -896,12 +896,11 @@ function upLayer(idLayer) {
}
function downLayer(idLayer) {
var toUpIndex = null
var toUpIndex = null;
var toDownIndex = null;
var found = false
var found = false;
for (var index in layerList) {
//int because in the object array there are method as string
if (isInt(index)) {
if (layerList[index] == idLayer) {
@ -916,7 +915,7 @@ function downLayer(idLayer) {
}
}
}
if (toUpIndex != null) {
layerToUp = "#layer_item_" + layerList[toUpIndex];
layerToDown = "#layer_item_" + layerList[toDownIndex];

@ -411,7 +411,7 @@ $(document).ready (function () {
else {
$("#module").html('<?php echo __('None'); ?>');
$("#module_name").html('');
$('input[type=checkbox]').attr('disabled', false);
$('input[type=checkbox]').removeAttr('disabled');
$(".select_modules_row_2").css('display', '');
}
@ -491,7 +491,7 @@ $(document).ready (function () {
$(".select_agents_row_2").css('display', '');
if($('#id_agents option:selected').val() == undefined) {
$("tr#delete_table-edit1, tr#delete_table-edit2, tr#delete_table-edit3, tr#delete_table-edit35, tr#delete_table-edit4, tr#delete_table-edit5, tr#delete_table-edit6, tr#delete_table-edit7, tr#delete_table-edit8").hide ();
}
}
}
}
}
@ -524,12 +524,12 @@ $(document).ready (function () {
else {
$("#module").html('<?php echo __('None'); ?>');
$("#id_agents").html('');
$('input[type=checkbox]').attr('disabled', false);
$('input[type=checkbox]').removeAttr('disabled');
$(".select_agents_row_2").css('display', '');
}
$("tr#delete_table-edit1, tr#delete_table-edit2, tr#delete_table-edit3, tr#delete_table-edit35, tr#delete_table-edit4, tr#delete_table-edit5, tr#delete_table-edit6, tr#delete_table-edit7, tr#delete_table-edit8").hide ();
jQuery.post ("ajax.php",
{"page" : "operation/agentes/ver_agente",
"get_agents_group_json" : 1,
@ -548,8 +548,6 @@ $(document).ready (function () {
);
}
);
});
/* ]]> */
</script>

@ -313,23 +313,23 @@ function type_change () {
$(document).ready (function () {
if ($("#snmp_version").value == "3"){
$("input[name=snmp3_auth_user]").css({backgroundColor: '#fff'});
$("input[name=snmp3_auth_user]").attr("disabled", false);
$("input[name=snmp3_auth_user]").css({backgroundColor: '#fff'});
$("input[name=snmp3_auth_user]").removeAttr('disabled');
$("input[name=snmp3_auth_pass]").css({backgroundColor: '#fff'});
$("input[name=snmp3_auth_pass]").attr("disabled", false);
$("input[name=snmp3_auth_pass]").removeAttr('disabled');
$("#snmp3_privacy_method").css({backgroundColor: '#fff'});
$("#snmp3_privacy_method").attr("disabled", false);
$("#snmp3_privacy_method").removeAttr('disabled');
$("input[name=snmp3_privacy_pass]").css({backgroundColor: '#fff'});
$("input[name=snmp3_privacy_pass]").attr("disabled", false);
$("input[name=snmp3_privacy_pass]").removeAttr('disabled');
$("#snmp3_auth_method").css({backgroundColor: '#fff'});
$("#snmp3_auth_method").attr("disabled", false);
$("#snmp3_auth_method").removeAttr('disabled');
$("#snmp3_security_level").css({backgroundColor: '#fff'});
$("#snmp3_security_level").attr("disabled", false);
$("#snmp3_security_level").removeAttr('disabled');
$("input[name=active_snmp_v3]").val(1);
$("input[name=snmp_community]").css({backgroundColor: '#ddd'});
@ -359,80 +359,28 @@ $(document).ready (function () {
$("input[name=active_snmp_v3]").val(0);
$("input[name=snmp_community]").css({backgroundColor: '#fff'});
$("input[name=snmp_community]").attr("disabled", false);
$("input[name=snmp_community]").removeAttr('disabled');
}
$("#snmp_version").change(function () {
if (this.value == "3") {
$("input[name=snmp3_auth_user]").css({backgroundColor: '#fff'});
$("input[name=snmp3_auth_user]").attr("disabled", false);
$("input[name=snmp3_auth_user]").removeAttr('disabled');
$("input[name=snmp3_auth_pass]").css({backgroundColor: '#fff'});
$("input[name=snmp3_auth_pass]").attr("disabled", false);
$("input[name=snmp3_auth_pass]").removeAttr('disabled');
$("#snmp3_privacy_method").css({backgroundColor: '#fff'});
$("#snmp3_privacy_method").attr("disabled", false);
$("#snmp3_privacy_method").removeAttr('disabled');
$("input[name=snmp3_privacy_pass]").css({backgroundColor: '#fff'});
$("input[name=snmp3_privacy_pass]").attr("disabled", false);
$("input[name=snmp3_privacy_pass]").removeAttr('disabled');
$("#snmp3_auth_method").css({backgroundColor: '#fff'});
$("#snmp3_auth_method").attr("disabled", false);
$("#snmp3_auth_method").removeAttr('disabled');
$("#snmp3_security_level").css({backgroundColor: '#fff'});
$("#snmp3_security_level").attr("disabled", false);
$("input[name=active_snmp_v3]").val(1);
$("input[name=snmp_community]").css({backgroundColor: '#ddd'});
$("input[name=snmp_community]").attr("disabled",true);
}
else {
$("input[name=snmp3_auth_user]").val("");
$("input[name=snmp3_auth_user]").css({backgroundColor: '#ddd'});
$("input[name=snmp3_auth_user]").attr("disabled", true);
$("input[name=snmp3_auth_pass]").val("");
$("input[name=snmp3_auth_pass]").css({backgroundColor: '#ddd'});
$("input[name=snmp3_auth_pass]").attr("disabled", true);
$("#snmp3_privacy_method").css({backgroundColor: '#ddd'});
$("#snmp3_privacy_method").attr("disabled", true);
$("input[name=snmp3_privacy_pass]").val("");
$("input[name=snmp3_privacy_pass]").css({backgroundColor: '#ddd'});
$("input[name=snmp3_privacy_pass]").attr("disabled", true);
$("#snmp3_auth_method").css({backgroundColor: '#ddd'});
$("#snmp3_auth_method").attr("disabled", true);
$("#snmp3_security_level").css({backgroundColor: '#ddd'});
$("#snmp3_security_level").attr("disabled", true);
$("input[name=active_snmp_v3]").val(0);
$("input[name=snmp_community]").css({backgroundColor: '#fff'});
$("input[name=snmp_community]").attr("disabled", false);
}
});
$("#type"). change(function () {
if ($("#snmp_version").value == "3") {
$("input[name=snmp3_auth_user]").css({backgroundColor: '#fff'});
$("input[name=snmp3_auth_user]").attr("disabled", false);
$("input[name=snmp3_auth_pass]").css({backgroundColor: '#fff'});
$("input[name=snmp3_auth_pass]").attr("disabled", false);
$("#snmp3_privacy_method").css({backgroundColor: '#fff'});
$("#snmp3_privacy_method").attr("disabled", false);
$("input[name=snmp3_privacy_pass]").css({backgroundColor: '#fff'});
$("input[name=snmp3_privacy_pass]").attr("disabled", false);
$("#snmp3_auth_method").css({backgroundColor: '#fff'});
$("#snmp3_auth_method").attr("disabled", false);
$("#snmp3_security_level").css({backgroundColor: '#fff'});
$("#snmp3_security_level").attr("disabled", false);
$("#snmp3_security_level").removeAttr('disabled');
$("input[name=active_snmp_v3]").val(1);
$("input[name=snmp_community]").css({backgroundColor: '#ddd'});
@ -446,23 +394,75 @@ $(document).ready (function () {
$("input[name=snmp3_auth_pass]").val("");
$("input[name=snmp3_auth_pass]").css({backgroundColor: '#ddd'});
$("input[name=snmp3_auth_pass]").attr("disabled", true);
$("#snmp3_privacy_method").css({backgroundColor: '#ddd'});
$("#snmp3_privacy_method").attr("disabled", true);
$("input[name=snmp3_privacy_pass]").val("");
$("input[name=snmp3_privacy_pass]").css({backgroundColor: '#ddd'});
$("input[name=snmp3_privacy_pass]").attr("disabled", true);
$("#snmp3_auth_method").css({backgroundColor: '#ddd'});
$("#snmp3_auth_method").attr("disabled", true);
$("#snmp3_security_level").css({backgroundColor: '#ddd'});
$("#snmp3_security_level").attr("disabled", true);
$("input[name=active_snmp_v3]").val(0);
$("input[name=snmp_community]").css({backgroundColor: '#fff'});
$("input[name=snmp_community]").attr("disabled", false);
$("input[name=snmp_community]").removeAttr('disabled');
}
});
$("#type"). change(function () {
if ($("#snmp_version").value == "3") {
$("input[name=snmp3_auth_user]").css({backgroundColor: '#fff'});
$("input[name=snmp3_auth_user]").removeAttr('disabled');
$("input[name=snmp3_auth_pass]").css({backgroundColor: '#fff'});
$("input[name=snmp3_auth_pass]").removeAttr('disabled');
$("#snmp3_privacy_method").css({backgroundColor: '#fff'});
$("#snmp3_privacy_method").removeAttr('disabled');
$("input[name=snmp3_privacy_pass]").css({backgroundColor: '#fff'});
$("input[name=snmp3_privacy_pass]").removeAttr('disabled');
$("#snmp3_auth_method").css({backgroundColor: '#fff'});
$("#snmp3_auth_method").removeAttr('disabled');
$("#snmp3_security_level").css({backgroundColor: '#fff'});
$("#snmp3_security_level").removeAttr('disabled');
$("input[name=active_snmp_v3]").val(1);
$("input[name=snmp_community]").css({backgroundColor: '#ddd'});
$("input[name=snmp_community]").attr("disabled",true);
}
else {
$("input[name=snmp3_auth_user]").val("");
$("input[name=snmp3_auth_user]").css({backgroundColor: '#ddd'});
$("input[name=snmp3_auth_user]").attr("disabled", true);
$("input[name=snmp3_auth_pass]").val("");
$("input[name=snmp3_auth_pass]").css({backgroundColor: '#ddd'});
$("input[name=snmp3_auth_pass]").attr("disabled", true);
$("#snmp3_privacy_method").css({backgroundColor: '#ddd'});
$("#snmp3_privacy_method").attr("disabled", true);
$("input[name=snmp3_privacy_pass]").val("");
$("input[name=snmp3_privacy_pass]").css({backgroundColor: '#ddd'});
$("input[name=snmp3_privacy_pass]").attr("disabled", true);
$("#snmp3_auth_method").css({backgroundColor: '#ddd'});
$("#snmp3_auth_method").attr("disabled", true);
$("#snmp3_security_level").css({backgroundColor: '#ddd'});
$("#snmp3_security_level").attr("disabled", true);
$("input[name=active_snmp_v3]").val(0);
$("input[name=snmp_community]").css({backgroundColor: '#fff'});
$("input[name=snmp_community]").removeAttr('disabled');
}
});
});

@ -1309,7 +1309,7 @@ function activeToolboxButton(id, active) {
$("input." + id + "[name=button_toolbox2]").removeAttr('disabled');
}
else {
$("input." + id + "[name=button_toolbox2]").attr('disabled', 'disabled');
$("input." + id + "[name=button_toolbox2]").attr('disabled', true);
}
}

@ -108,7 +108,6 @@ echo '</form>';
$(".remote").css("display", "");
}
$("." + auth_method).css('display', '');
}
function enable_profile_options () {
@ -118,10 +117,11 @@ echo '</form>';
$("#default_remote_profile").attr("disabled", true);
$("#default_remote_group").attr("disabled", true);
$("#text-autocreate_blacklist").attr("disabled", true);
} else {
$("#default_remote_profile").attr("disabled", false);
$("#default_remote_group").attr("disabled", false);
$("#text-autocreate_blacklist").attr("disabled", false);
}
else {
$("#default_remote_profile").removeAttr('disabled');
$("#default_remote_group").removeAttr('disabled');
$("#text-autocreate_blacklist").removeAttr('disabled');
}
}

@ -102,7 +102,7 @@ function agent_changed (event, id_agent, selected) {
});
if (selected != undefined)
$('#module').attr ('value', selected);
$('#module').attr ('disabled', 0);
$('#module').removeAttr('disabled');
},
"json"
);
@ -205,7 +205,7 @@ function agent_changed_by_multiple_agents (event, id_agent, selected) {
});
if (selected != undefined)
$('#module').attr ('value', selected);
$('#module').attr ('disabled', 0);
$('#module').removeAttr('disabled');
},
"json"
);
@ -263,7 +263,7 @@ function agent_changed_by_multiple_agents_with_alerts (event, id_agent, selected
});
if (selected != undefined)
$('#module').attr ('value', selected);
$('#module').attr ('disabled', 0);
$('#module').removeAttr('disabled');
},
"json"
);
@ -321,7 +321,7 @@ function module_changed_by_multiple_modules (event, id_module, selected) {
});
if (selected != undefined)
$('#agents').attr ('value', selected);
$('#agents').attr ('disabled', 0);
$('#agents').removeAttr('disabled');
},
"json"
);
@ -379,7 +379,7 @@ function agent_changed_by_multiple_agents_id (event, id_agent, selected) {
});
if (selected != undefined)
$('#module').attr ('value', selected);
$('#module').attr ('disabled', 0);
$('#module').removeAttr('disabled');
},
"json"
);

@ -271,7 +271,6 @@ echo html_print_input_text ('data_section', $user_info["data_section"], '', 60,
echo '</td></tr></table>';
echo '<div style="width:90%; text-align:right;">';
if (!$config["user_can_update_info"]) {
echo '<i>'.__('You can not change your user info from Pandora FMS under the current authentication scheme').'</i>';