mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
2012-09-11 Sergio Martin <sergio.martin@artica.es>
* include/javascript/pandora_modules.js: Fixed the reset of the form of local modules after select a module component and unselect it git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6952 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
de474a11b1
commit
acce7617fa
@ -1,3 +1,9 @@
|
|||||||
|
2012-09-11 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* include/javascript/pandora_modules.js: Fixed the reset of the
|
||||||
|
form of local modules after select a module component and
|
||||||
|
unselect it
|
||||||
|
|
||||||
2012-09-10 Miguel de Dios <miguel.dedios@artica.es>
|
2012-09-10 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* general/header.php: fixed the link to logout when the Pandora
|
* general/header.php: fixed the link to logout when the Pandora
|
||||||
|
@ -23,8 +23,10 @@ function configure_modules_form () {
|
|||||||
|
|
||||||
var $select = $("#local_component").hide ();
|
var $select = $("#local_component").hide ();
|
||||||
$("#component").hide ();
|
$("#component").hide ();
|
||||||
if (this.value == 0)
|
if (this.value == 0) {
|
||||||
|
reset_data_module_form();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
$("#component_loading").show ();
|
$("#component_loading").show ();
|
||||||
$(".error, #no_component").hide ();
|
$(".error, #no_component").hide ();
|
||||||
$("option[value!=0]", $select).remove ();
|
$("option[value!=0]", $select).remove ();
|
||||||
@ -56,10 +58,39 @@ function configure_modules_form () {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
function reset_data_module_form() {
|
||||||
|
// Delete macro fields
|
||||||
|
$('.macro_field').remove();
|
||||||
|
|
||||||
|
// Hide show/hide configuration data switch
|
||||||
|
$('#simple-show_configuration_data').hide();
|
||||||
|
$('#simple-hide_configuration_data').hide();
|
||||||
|
$('#configuration_data_legend').hide();
|
||||||
|
|
||||||
|
$("#textarea_configuration_data").val('');
|
||||||
|
$('#simple-configuration_data').show();
|
||||||
|
|
||||||
|
$("#text-name").val('');
|
||||||
|
$("#textarea_description").val('');
|
||||||
|
$("#checkbox-history_data").check ();
|
||||||
|
$("#text-max").attr ("value", "");
|
||||||
|
$("#text-min").attr ("value", "");
|
||||||
|
$("#text-min_warning").attr ("value", 0);
|
||||||
|
$("#text-max_warning").attr ("value", 0);
|
||||||
|
$("#text-str_warning").attr ("value", '');
|
||||||
|
$("#text-min_critical").attr ("value", 0);
|
||||||
|
$("#text-max_critical").attr ("value", 0);
|
||||||
|
$("#text-str_critical").attr ("value", '');
|
||||||
|
$("#text-ff_event").attr ("value", 0);
|
||||||
|
$("#text-post_process").attr("value", 0);
|
||||||
|
$("#text-unit").attr("value", '');
|
||||||
|
}
|
||||||
|
|
||||||
$("#local_component").change (function () {
|
$("#local_component").change (function () {
|
||||||
if (this.value == 0)
|
if (this.value == 0) {
|
||||||
|
reset_data_module_form();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
$("#component_loading").show ();
|
$("#component_loading").show ();
|
||||||
$(".error").hide ();
|
$(".error").hide ();
|
||||||
jQuery.post ("ajax.php",
|
jQuery.post ("ajax.php",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user