修正校區選擇
This commit is contained in:
parent
88b723aeb4
commit
78d73cc11a
@ -572,7 +572,6 @@
|
|||||||
if (!Array.isArray(sent_data)) {
|
if (!Array.isArray(sent_data)) {
|
||||||
sent_data = [sent_data];
|
sent_data = [sent_data];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sent_data.some((s) => s.building_tag)) {
|
if (!sent_data.some((s) => s.building_tag)) {
|
||||||
toast_error("請選擇棟別");
|
toast_error("請選擇棟別");
|
||||||
return;
|
return;
|
||||||
@ -1067,10 +1066,11 @@
|
|||||||
|
|
||||||
$("#school_zone").on("click", function (event) {
|
$("#school_zone").on("click", function (event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
if (event.target.tagName !== "INPUT") {
|
if (event.target.tagName !== "INPUT" && !$(event.target).hasClass("active")) {
|
||||||
$("#school_zone label.active").removeClass("active");
|
$("#school_zone label.active").removeClass("active");
|
||||||
$(event.target).addClass("active");
|
$(event.target).addClass("active");
|
||||||
} else {
|
SelectBuildings = []
|
||||||
|
} else if (event.target.tagName === "INPUT") {
|
||||||
school_zone = event.target.value;
|
school_zone = event.target.value;
|
||||||
getbuildings(school_zone);
|
getbuildings(school_zone);
|
||||||
}
|
}
|
||||||
@ -1087,5 +1087,6 @@
|
|||||||
}
|
}
|
||||||
$("#building").find(".item").empty();
|
$("#building").find(".item").empty();
|
||||||
$("#building").find(".item").append(html);
|
$("#building").find(".item").append(html);
|
||||||
|
SelectBuildings = []
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user