From edd6aee00f71028796c3f31057d3e1ba8527cd72 Mon Sep 17 00:00:00 2001 From: Nightblade73 Date: Sat, 23 Mar 2019 12:52:52 +0400 Subject: [PATCH] #53 fast fix --- src/main/resources/public/js/conference.js | 8 +++++--- src/main/resources/templates/conferences/conferences.html | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/resources/public/js/conference.js b/src/main/resources/public/js/conference.js index f762597..304daae 100644 --- a/src/main/resources/public/js/conference.js +++ b/src/main/resources/public/js/conference.js @@ -8,16 +8,18 @@ $(document).ready(function () { $(this).children('.circle').toggleClass('circle-active'); }); - $('.checkbox').parent().click( function() { + $('.checkbox-js').parent().click( function() { $(this).children('.checkbox').toggleClass('selected'); }); $('#select-all-js').click( function() { + $(this).toggleClass('selected'); + var childNodes = $('.conference-item .form-check .checkbox') .each(function(i, elem) { - if ($(this).hasClass('selected') && $('#select-all-js').hasClass('selected')) { + if ($(this).hasClass('selected') && !$('#select-all-js').hasClass('selected')) { $(this).toggleClass('selected'); - } else if (!$(this).hasClass('selected') && !$('#select-all-js').hasClass('selected')){ + } else if (!$(this).hasClass('selected') && $('#select-all-js').hasClass('selected')){ $(this).toggleClass('selected'); } }); diff --git a/src/main/resources/templates/conferences/conferences.html b/src/main/resources/templates/conferences/conferences.html index 4b51e7f..fc5df8e 100644 --- a/src/main/resources/templates/conferences/conferences.html +++ b/src/main/resources/templates/conferences/conferences.html @@ -35,7 +35,7 @@
-
+
@@ -48,7 +48,7 @@
-
+