format index

This commit is contained in:
Vincent BOUQUET
2023-12-11 21:31:29 +01:00
parent e31b85246c
commit 1af18ea84c

View File

@@ -306,9 +306,9 @@
<div class="rains"> <div class="rains">
<div id="iforte_rains_bar_max" style="width: 50%"></div> <div id="iforte_rains_bar_max" style="width: 50%"></div>
</div> </div>
<button class="btn btn-primary btn-block">MAX WET reset</button> <button class="btn btn-primary btn-block" id="maxwetreset">MAX WET reset</button>
<p> <p>
<small id="iforte_wrt">last reset: 2.3.2023 16:19:57</small> <small id="iforte_demo_rains_last_reset"></small>
</p> </p>
</div> </div>
</div> </div>
@@ -363,32 +363,15 @@
$(".sb").unbind(); $(".sb").unbind();
$("#m-f").empty(); $("#m-f").empty();
$("#m-f").append( $("#m-f").append(
'<button type="button" class="btn btn-primary sb">Save</button>' '<button type="button" class="btn btn-primary sb">Save</button>');
);
if (a_m == 0) $("#m-f").show(); if (a_m == 0) $("#m-f").show();
else $("#m-f").hide(); else $("#m-f").hide();
var h = ""; var h = "";
if (a_m == 0) { if (a_m == 0) {
h += c_txt( h += c_txt("iforte_dmxa","DMX address","Please put DMX address from 1 to 512");
"iforte_dmxa",
"DMX address",
"Please put DMX address from 1 to 512"
);
h += c_opt("iforte_dmxp", "DMX preset", [2], "Mode ", 0, 1, ""); h += c_opt("iforte_dmxp", "DMX preset", [2], "Mode ", 0, 1, "");
h += c_opt( h += c_opt("iforte_dmxi","DMX input",["wired", "wireless", "wireless XLR out"],"",0,1,"Can not set wireless input now!");
"iforte_dmxi", h += c_txt("iforte_rdmn","RDM label","Please insert label,max 32 characters");
"DMX input",
["wired", "wireless", "wireless XLR out"],
"",
0,
1,
"Can not set wireless input now!"
);
h += c_txt(
"iforte_rdmn",
"RDM label",
"Please insert label,max 32 characters"
);
} else if (a_m == 1) { } else if (a_m == 1) {
h += c_btn("Power on time reset", 0, " rh"); h += c_btn("Power on time reset", 0, " rh");
} else if (a_m == 2) { } else if (a_m == 2) {
@@ -406,61 +389,20 @@
$("#cfg-modal").modal(); $("#cfg-modal").modal();
$(".sb").bind("click", function () { $(".sb").bind("click", function () {
loader(1); loader(1);
var par = [ var par = ["iforte_dmxa","iforte_dmxp","iforte_dmxi","iforte_rdmn"];
"iforte_dmxa", do_ajax("/set_dmx", serialize_parameters(par));
"iforte_dmxp",
"iforte_dmxi",
"iforte_rdmn",
];
do_ajax("/set_dmx", pv(par), function (json) {
if (json) {
if (json["status"] == 0) {
copy_form_values(0);
if (a_m == 0) {
console.log(json["dmxf"]);
fill_values(json, ["dmxf"]);
}
ptit(json["pt"]);
close_modal();
}
show_errors(json["status"], par);
loader(0);
}
});
}); });
// hours reset // hours reset
$(".rh").bind("click", function () { $(".rh").bind("click", function () {
loader(1); loader(1);
do_ajax( do_ajax('/reset_hours', "rh=" + this.value)
"/reset_hours",
{
index: $(this).attr("value"),
},
function (json) {
if (json) {
fill_values(json, ["hr0", "hr1", "hr2", "hr3"]);
}
loader(0);
}
);
}); });
// max temp reset // max temp reset
$(".rt").bind("click", function () { $(".rt").bind("click", function () {
loader(1); loader(1);
do_ajax( do_ajax('/reset_temps', "rt=" + this.value)
"/reset_temps",
{
index: $(this).attr("value"),
},
function (json) {
if (json) {
fill_values(json, ["tmr0", "tmr1", "tmr2"]);
}
loader(0);
}
);
}); });
// wireless unlink // wireless unlink
@@ -475,6 +417,10 @@
$("#esm").on("click", function () { $("#esm").on("click", function () {
toggleStandbyMode(); toggleStandbyMode();
}); });
// max wet reset
$("#maxwetreset").on("click", function () {
do_ajax('/max_wet', "0");
});
</script> </script>
</body> </body>
</html> </html>