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로 변경 */ /* 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{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::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 .table_ul li:nth-child(2n)::after{display:none;}
.sub .election .receipt_number_table_wrap .thead_ul li:nth-child(odd){width:60px;} .sub .election .receipt_number_table_wrap .thead_ul li:nth-child(odd){width:60px;}

View File

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