unnecessary logs and functions

This commit is contained in:
Vincent BOUQUET
2023-12-11 21:30:09 +01:00
parent c61d29e0dc
commit df2d53dbca

View File

@@ -28,43 +28,13 @@ $(document).ready(function () {
$(document).on("click", "#scfg", function () { $(document).on("click", "#scfg", function () {
$("#m-t").html("Site settings"); $("#m-t").html("Site settings");
var h = "<h3>Password settings</h3>"; var h = "<h3>Password settings</h3>";
h += c_txt( h += c_txt("opswd","Old password","Please put old password (four digits)","","password");
"opswd", h += c_txt("npswd","New password","Please put new password (four digits)","","password");
"Old password", h += c_txt("npsch","New password check","New passwords check failed","","password");
"Please put old password (four digits)",
"",
"password"
);
h += c_txt(
"npswd",
"New password",
"Please put new password (four digits)",
"",
"password"
);
h += c_txt(
"npsch",
"New password check",
"New passwords check failed",
"",
"password"
);
h += "<br><h3>Simulator</h3>"; h += "<br><h3>Simulator</h3>";
h += c_btn("Reset demo values", "btnresetdemo", " btnresetdemo"); h += c_btn("Reset demo values", "btnresetdemo", " btnresetdemo");
h += c_rad( h += c_rad("iforte_demo_rains_age","RAINS tubes age",["New", "Average", "Old"],"","");
"iforte_demo_rains_age", h += c_rad("iforte_demo_pressure_test","Pressure test",["OK", "Failing"],"","");
"RAINS tubes age",
["New", "Average", "Old"],
"",
""
);
h += c_rad(
"iforte_demo_pressure_test",
"Pressure test",
["OK", "Failing"],
"",
""
);
$("#m-b").html(h); $("#m-b").html(h);
$(".sb").unbind(); $(".sb").unbind();
copy_form_values(2); copy_form_values(2);
@@ -79,16 +49,7 @@ $(document).ready(function () {
"iforte_demo_rains_age", "iforte_demo_rains_age",
"iforte_demo_pressure_test", "iforte_demo_pressure_test",
]; ];
do_ajax("/set_cfg", pv(par), function (json) { do_ajax("/set_cfg", serialize_parameters(par));
if (json) {
if (json["status"] == 0) {
close_modal();
location = "/";
}
show_errors(json["status"], par);
loader(0);
}
});
}); });
}); });
@@ -254,9 +215,8 @@ function do_ajax(p_url, p_data) {
default: default:
for (const [key, value] of Object.entries(p_data)) { for (const [key, value] of Object.entries(p_data)) {
//sessionStorage.setItem(key, value) sessionStorage.setItem(key, value)
console.log("key: %o", key); console.log("set key: " + key + " to val: " + value);
console.log("val: %o", value);
if (key == "iforte_tmpu") { if (key == "iforte_tmpu") {
if (value == 0) { if (value == 0) {