2023/12/08 선거문자 스크립트 수정

This commit is contained in:
subsub 2023-12-08 10:41:35 +09:00
parent c47568ef82
commit b430b94e60
2 changed files with 22 additions and 18 deletions

View File

@ -628,7 +628,7 @@ button.check_validity:hover {border: 1px solid #a3a3a3;box-shadow: 0px 0px 5px
/* 2023/12/07 선거문자 - 20건문자(수동문자) 전송 추가 table에서 ul로 변경 */
.sub .election .receipt_number_table_wrap .table_ul{display:flex;flex-wrap:wrap;text-align:center;align-content:flex-start;}
.sub .election .receipt_number_table_wrap .table_ul li{position:relative;display:flex;border:0;background:transparent;justify-content:center;align-items:center;}
.sub .election .receipt_number_table_wrap .table_ul li{position:relative;display:flex;border:0;background:transparent;justify-content:center;align-items:center;z-index:5;}
.sub .election .receipt_number_table_wrap .table_ul li::after{position:absolute;content:"";width:1px;height:16px;background:#d4d4d4;right:0;top:50%;transform:translateY(-50%);}
.sub .election .receipt_number_table_wrap .table_ul li:nth-child(2n)::after{display:none;}
.sub .election .receipt_number_table_wrap .thead_ul li:nth-child(odd){width:60px;}

View File

@ -31,23 +31,27 @@
<script>
$(document).ready(function () {
$(".receipt_number_table_wrap .tbody_ul").selectable({
selecting: function (event, ui) {
$(ui.selecting).find("input[type='checkbox']").attr("checked", "checked");
},
selected: function (event, ui) {
if ($(ui.selected).find("input[type='checkbox']").attr("checked") == true) {
$(ui.selected).find("input[type='checkbox']").removeAttr("checked");
} else {
$(ui.selected).find("input[type='checkbox']").attr("checked", "checked");
}
},
unselecting: function (event, ui) {
$(ui.unselecting).find("input[type='checkbox']").removeAttr("checked");
},
unselected: function (event, ui) {
$(ui.unselected).find("input[type='checkbox']").removeAttr("checked");
},
filter: "li"
filter: "li",
stop: function () {
$(".ui-selected input",this).each(function () {
console.log("stop"+this);
this.checked = !this.checked;
if ($(this).is(':checked')) {
console.log($(this));
$(this).closest(".ui-widget-content").addClass("ui-selected");
} else {
$(this).closest(".ui-widget-content").removeClass("ui-selected");
}
});
}
});
$(".receipt_number_table_wrap .tbody_ul input[type='checkbox']",".receipt_number_table_wrap .tbody_ul input[type='checkbox']+label").click(function () {
if ($(this).is(':checked')) {
$(this).closest(".ui-widget-content").addClass("ui-selected");
} else {
$(this).closest(".ui-widget-content").removeClass("ui-selected");
}
});
onlongclick(".btn_check_one", 1000, function () {