From ae71b9649da99ce4bc5d3fe491b980916f9cac70 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 12 Apr 2024 22:09:37 +0200 Subject: [PATCH] =?UTF-8?q?Clic=20dans=20le=20TR=20active=20la=20case=20?= =?UTF-8?q?=C3=A0=20cocher.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/course/view/usersAdd/usersAdd.css | 8 ++------ core/module/course/view/usersAdd/usersAdd.js.php | 7 +++++++ core/module/course/view/usersDelete/usersDelete.css | 10 +++------- core/module/course/view/usersDelete/usersDelete.js.php | 7 +++++++ 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/core/module/course/view/usersAdd/usersAdd.css b/core/module/course/view/usersAdd/usersAdd.css index bf7a886..f8c2840 100644 --- a/core/module/course/view/usersAdd/usersAdd.css +++ b/core/module/course/view/usersAdd/usersAdd.css @@ -17,10 +17,6 @@ * admin.css */ -#courseUserAddSelectAll { - color: lightgreen; -} - -#courseUserAddSelectNone { - color: lightcoral; +tr { + cursor: pointer; } \ No newline at end of file diff --git a/core/module/course/view/usersAdd/usersAdd.js.php b/core/module/course/view/usersAdd/usersAdd.js.php index f71e6a0..526d47f 100644 --- a/core/module/course/view/usersAdd/usersAdd.js.php +++ b/core/module/course/view/usersAdd/usersAdd.js.php @@ -13,6 +13,13 @@ $(document).ready((function () { + $('tr').click(function(){ + // Cochez ou décochez la case à cocher dans cette ligne + $(this).find('input[type="checkbox"]').prop('checked', function(i, val){ + return !val; // Inverse l'état actuel de la case à cocher + }); + }); + $('#courseUserAddSelectAll').on('click', function() { $('.checkboxSelect').prop('checked', true); saveCheckboxState(); diff --git a/core/module/course/view/usersDelete/usersDelete.css b/core/module/course/view/usersDelete/usersDelete.css index 198551e..bcf581b 100644 --- a/core/module/course/view/usersDelete/usersDelete.css +++ b/core/module/course/view/usersDelete/usersDelete.css @@ -21,10 +21,6 @@ background-color: rgba(217, 95, 78, 1); } -#courseUserDeleteSelectAll { - color: lightgreen; -} - -#courseUserDeleteSelectNone { - color: lightcoral; -} +tr { + cursor: pointer; +} \ No newline at end of file diff --git a/core/module/course/view/usersDelete/usersDelete.js.php b/core/module/course/view/usersDelete/usersDelete.js.php index 4ec2315..8324986 100644 --- a/core/module/course/view/usersDelete/usersDelete.js.php +++ b/core/module/course/view/usersDelete/usersDelete.js.php @@ -13,6 +13,13 @@ $(document).ready((function () { + $('tr').click(function () { + // Cochez ou décochez la case à cocher dans cette ligne + $(this).find('input[type="checkbox"]').prop('checked', function (i, val) { + return !val; // Inverse l'état actuel de la case à cocher + }); + }); + $('#courseUserDeleteSelectAll').on('click', function () { $('.checkboxSelect').prop('checked', true); saveCheckboxState();