From 7f2fbb36e2f03714f35edd29e7610cfaa99472a5 Mon Sep 17 00:00:00 2001 From: mirine-snow Date: Wed, 23 Aug 2023 22:01:24 +0900 Subject: [PATCH] 230823 fix check all box --- src/Eccube/Resource/template/admin/Order/index.twig | 2 +- src/Eccube/Resource/template/admin/Product/index.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Eccube/Resource/template/admin/Order/index.twig b/src/Eccube/Resource/template/admin/Order/index.twig index ecadb648358..732c038f9bd 100644 --- a/src/Eccube/Resource/template/admin/Order/index.twig +++ b/src/Eccube/Resource/template/admin/Order/index.twig @@ -20,7 +20,7 @@ file that was distributed with this source code. $(function() { toggleBtnBulk('input[id^="check_"]', '.btn-bulk-wrapper'); $('input[id^="check_"]').on('change', function() { - $('#toggle_check_all').prop('checked', false); + $('#toggle_check_all').prop('checked', $('input[id^="check_"]:not(:checked)').length === 0); toggleBtnBulk('input[id^="check_"]', '.btn-bulk-wrapper'); }); diff --git a/src/Eccube/Resource/template/admin/Product/index.twig b/src/Eccube/Resource/template/admin/Product/index.twig index 4a9f950fc00..670ad928679 100644 --- a/src/Eccube/Resource/template/admin/Product/index.twig +++ b/src/Eccube/Resource/template/admin/Product/index.twig @@ -77,7 +77,7 @@ file that was distributed with this source code. toggleBtnBulk('input[id^="check_"]', '#btn_bulk'); $('input[id^="check_"]').on('change', function() { - $('#trigger_check_all').prop('checked', false); + $('#trigger_check_all').prop('checked', $('input[id^="check_"]:not(:checked)').length === 0); toggleBtnBulk('input[id^="check_"]', '#btn_bulk'); });