diff --git a/src/main/resources/public/css/conference.css b/src/main/resources/public/css/conference.css index 8175771..01176c0 100644 --- a/src/main/resources/public/css/conference.css +++ b/src/main/resources/public/css/conference.css @@ -21,11 +21,29 @@ } .form-check { - padding: 0; + display: flex; + align-items: center; + justify-content: center; + width: 31px; + height: 41px; } -.form-check input { - margin: 10px 5px; +.checkbox { + position: relative; + width: 13px; + height: 13px; + border-radius: 15%; + background: #fff; + border: 1px solid #aaa; + cursor: pointer; +} + +.selected:before { + content: '✔'; + position: absolute; + line-height: 0.8; + color: #09ad7e; + transition: all .2s; } .circle { diff --git a/src/main/resources/public/js/conference.js b/src/main/resources/public/js/conference.js index 2c657d2..f762597 100644 --- a/src/main/resources/public/js/conference.js +++ b/src/main/resources/public/js/conference.js @@ -1,10 +1,25 @@ $(document).ready(function () { - $('.conference-info').click( function() { + $('.data-href-js').click( function() { window.location = $(this).attr('data-href'); }); $('.circle').parent().click( function() { - $(this).children(".circle").toggleClass('circle-active'); + $(this).children('.circle').toggleClass('circle-active'); + }); + + $('.checkbox').parent().click( function() { + $(this).children('.checkbox').toggleClass('selected'); + }); + + $('#select-all-js').click( function() { + var childNodes = $('.conference-item .form-check .checkbox') + .each(function(i, elem) { + if ($(this).hasClass('selected') && $('#select-all-js').hasClass('selected')) { + $(this).toggleClass('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 857df60..4b51e7f 100644 --- a/src/main/resources/templates/conferences/conferences.html +++ b/src/main/resources/templates/conferences/conferences.html @@ -20,12 +20,12 @@
- +
- +
-
@@ -35,12 +35,26 @@
- +
+
+
+
+
+
+
Конференция 1
+
01.01.1990
+
+
+
+
+
-
+
Конференция 1
01.01.1990