format index
This commit is contained in:
@@ -306,9 +306,9 @@
|
||||
<div class="rains">
|
||||
<div id="iforte_rains_bar_max" style="width: 50%"></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>
|
||||
<small id="iforte_wrt">last reset: 2.3.2023 16:19:57</small>
|
||||
<small id="iforte_demo_rains_last_reset"></small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -363,32 +363,15 @@
|
||||
$(".sb").unbind();
|
||||
$("#m-f").empty();
|
||||
$("#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();
|
||||
else $("#m-f").hide();
|
||||
var h = "";
|
||||
if (a_m == 0) {
|
||||
h += c_txt(
|
||||
"iforte_dmxa",
|
||||
"DMX address",
|
||||
"Please put DMX address from 1 to 512"
|
||||
);
|
||||
h += c_txt("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_dmxi",
|
||||
"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"
|
||||
);
|
||||
h += c_opt("iforte_dmxi","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) {
|
||||
h += c_btn("Power on time reset", 0, " rh");
|
||||
} else if (a_m == 2) {
|
||||
@@ -406,61 +389,20 @@
|
||||
$("#cfg-modal").modal();
|
||||
$(".sb").bind("click", function () {
|
||||
loader(1);
|
||||
var par = [
|
||||
"iforte_dmxa",
|
||||
"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);
|
||||
}
|
||||
});
|
||||
var par = ["iforte_dmxa","iforte_dmxp","iforte_dmxi","iforte_rdmn"];
|
||||
do_ajax("/set_dmx", serialize_parameters(par));
|
||||
});
|
||||
|
||||
// hours reset
|
||||
$(".rh").bind("click", function () {
|
||||
loader(1);
|
||||
do_ajax(
|
||||
"/reset_hours",
|
||||
{
|
||||
index: $(this).attr("value"),
|
||||
},
|
||||
function (json) {
|
||||
if (json) {
|
||||
fill_values(json, ["hr0", "hr1", "hr2", "hr3"]);
|
||||
}
|
||||
loader(0);
|
||||
}
|
||||
);
|
||||
do_ajax('/reset_hours', "rh=" + this.value)
|
||||
});
|
||||
|
||||
// max temp reset
|
||||
$(".rt").bind("click", function () {
|
||||
loader(1);
|
||||
do_ajax(
|
||||
"/reset_temps",
|
||||
{
|
||||
index: $(this).attr("value"),
|
||||
},
|
||||
function (json) {
|
||||
if (json) {
|
||||
fill_values(json, ["tmr0", "tmr1", "tmr2"]);
|
||||
}
|
||||
loader(0);
|
||||
}
|
||||
);
|
||||
do_ajax('/reset_temps', "rt=" + this.value)
|
||||
});
|
||||
|
||||
// wireless unlink
|
||||
@@ -475,6 +417,10 @@
|
||||
$("#esm").on("click", function () {
|
||||
toggleStandbyMode();
|
||||
});
|
||||
// max wet reset
|
||||
$("#maxwetreset").on("click", function () {
|
||||
do_ajax('/max_wet', "0");
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user