|
@ -161,9 +161,9 @@ function validateForm(form) { |
|
|
function getValue(element) { |
|
|
function getValue(element) { |
|
|
|
|
|
|
|
|
if ($(element).attr("type") === "checkbox") { |
|
|
if ($(element).attr("type") === "checkbox") { |
|
|
return $(element).is(":checked") ? 1 : 0; |
|
|
|
|
|
|
|
|
return $(element).prop("checked") ? 1 : 0; |
|
|
} else if ($(element).attr("type") === "radio") { |
|
|
} else if ($(element).attr("type") === "radio") { |
|
|
if (!$(element).is(":checked")) { |
|
|
|
|
|
|
|
|
if (!$(element).prop("checked")) { |
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -559,9 +559,9 @@ function toggleMenu() { |
|
|
|
|
|
|
|
|
function showPanel() { |
|
|
function showPanel() { |
|
|
$(".panel").hide(); |
|
|
$(".panel").hide(); |
|
|
$("#" + $(this).attr("data")).show(); |
|
|
|
|
|
if ($("#layout").hasClass("active")) { toggleMenu(); } |
|
|
if ($("#layout").hasClass("active")) { toggleMenu(); } |
|
|
$("input[type='checkbox']"). |
|
|
|
|
|
|
|
|
$("#" + $(this).attr("data")).show(). |
|
|
|
|
|
find("input[type='checkbox']"). |
|
|
iphoneStyle("calculateDimensions"). |
|
|
iphoneStyle("calculateDimensions"). |
|
|
iphoneStyle("refresh"); |
|
|
iphoneStyle("refresh"); |
|
|
} |
|
|
} |
|
@ -674,9 +674,13 @@ function addSchedule(event) { |
|
|
}); |
|
|
}); |
|
|
$(line).find(".button-del-schedule").on("click", delSchedule); |
|
|
$(line).find(".button-del-schedule").on("click", delSchedule); |
|
|
$(line).find(".button-more-schedule").on("click", moreSchedule); |
|
|
$(line).find(".button-more-schedule").on("click", moreSchedule); |
|
|
var ena = $(line).find(":checkbox"); |
|
|
|
|
|
ena.prop("checked", false).iphoneStyle("refresh"); |
|
|
|
|
|
line.appendTo("#schedules"); |
|
|
line.appendTo("#schedules"); |
|
|
|
|
|
|
|
|
|
|
|
$(line).find("input[type='checkbox']"). |
|
|
|
|
|
prop("checked", false). |
|
|
|
|
|
iphoneStyle("calculateDimensions"). |
|
|
|
|
|
iphoneStyle("refresh"); |
|
|
|
|
|
|
|
|
return line; |
|
|
return line; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -697,7 +701,7 @@ function initRelays(data) { |
|
|
$(".id", line).html(i); |
|
|
$(".id", line).html(i); |
|
|
$("input", line).attr("data", i); |
|
|
$("input", line).attr("data", i); |
|
|
line.appendTo("#relays"); |
|
|
line.appendTo("#relays"); |
|
|
$(":checkbox", line).iphoneStyle({ |
|
|
|
|
|
|
|
|
$("input[type='checkbox']", line).iphoneStyle({ |
|
|
onChange: doToggle, |
|
|
onChange: doToggle, |
|
|
resizeContainer: true, |
|
|
resizeContainer: true, |
|
|
resizeHandle: true, |
|
|
resizeHandle: true, |
|
@ -1079,7 +1083,7 @@ function processData(data) { |
|
|
var sch_value = schedule[key]; |
|
|
var sch_value = schedule[key]; |
|
|
$("input[name='" + key + "']", sch_line).val(sch_value); |
|
|
$("input[name='" + key + "']", sch_line).val(sch_value); |
|
|
$("select[name='" + key + "']", sch_line).prop("value", sch_value); |
|
|
$("select[name='" + key + "']", sch_line).prop("value", sch_value); |
|
|
$(":checkbox[name='" + key + "']", sch_line). |
|
|
|
|
|
|
|
|
$("input[type='checkbox'][name='" + key + "']", sch_line). |
|
|
prop("checked", sch_value). |
|
|
prop("checked", sch_value). |
|
|
iphoneStyle("refresh"); |
|
|
iphoneStyle("refresh"); |
|
|
}); |
|
|
}); |
|
|