From 61040f78e932c933712def1959a3ccd3e6568971 Mon Sep 17 00:00:00 2001 From: subsub Date: Tue, 12 Dec 2023 11:32:21 +0900 Subject: [PATCH] =?UTF-8?q?2023/12/12=20=EC=84=A0=EA=B1=B0=EB=AC=B8?= =?UTF-8?q?=EC=9E=90=20=EC=A0=84=EC=B2=B4=20=EC=B2=B4=ED=81=AC=EB=B0=95?= =?UTF-8?q?=EC=8A=A4=20=ED=81=B4=EB=A6=AD=20=EC=8B=9C=20=EC=88=9C=EC=B0=A8?= =?UTF-8?q?=EC=A0=81=EC=9C=BC=EB=A1=9C=20=EC=84=A0=ED=83=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/publish/js/publish.js | 6 +++++- src/main/webapp/publish/sub_election_2023.html | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/publish/js/publish.js b/src/main/webapp/publish/js/publish.js index 618d79e6..2bcd292e 100644 --- a/src/main/webapp/publish/js/publish.js +++ b/src/main/webapp/publish/js/publish.js @@ -12,7 +12,7 @@ var onlongclick = function ($target, time, callback) { var publishCommon = { count: 0, - longMousePressCheck: function (checkTarget, checkTime) { + longMousePressCheck: function (checkTarget, checkTime , $target) { // checkTarget → 체크박스([name='']) / checkTime → 몇초 간격으로 체크 될지 var checkLength = checkTarget.length; // 체크박스 몇개인지 var cnt = 0; // 몇개 체크됐는지 @@ -22,6 +22,10 @@ var publishCommon = { clearInterval(checkEvent); // 자동체크 끝. } $(checkTarget[cnt]).prop('checked', true); // 체크박스 체크. + $($target).on("mouseup",function(){ + //마우스떼면 멈춤 + clearInterval(checkEvent); + }); cnt++; }, checkTime); }, diff --git a/src/main/webapp/publish/sub_election_2023.html b/src/main/webapp/publish/sub_election_2023.html index e71f818c..97242a10 100644 --- a/src/main/webapp/publish/sub_election_2023.html +++ b/src/main/webapp/publish/sub_election_2023.html @@ -54,10 +54,20 @@ } }); - onlongclick(".btn_check_one", 1000, function () { + $(".input_wrap #checkAll").click(function(){ var checkbox = $('[name=receipt_number_check]'); - publishCommon.longMousePressCheck(checkbox, 300); + if($(this).is(":checked") !== true){ + checkbox.prop("checked",false); + }else{ + publishCommon.longMousePressCheck(checkbox, 100); + } }); + + onlongclick(".btn_check_one", 100, function (e) { + var checkbox = $('[name=receipt_number_check]'); + publishCommon.longMousePressCheck(checkbox, 100, $(".btn_check_one")); + }); + $(".btn_check_one").click(function(){ var checkbox = $('[name=receipt_number_check]'); @@ -1339,7 +1349,7 @@
    -
  • +
  • 번호