diff --git a/src/main/resources/public/js/conference.js b/src/main/resources/public/js/conference.js index 35e3c42..1b3b7f9 100644 --- a/src/main/resources/public/js/conference.js +++ b/src/main/resources/public/js/conference.js @@ -1,10 +1,15 @@ $(document).ready(function () { - $('#table_id').dataTable({ + $('#table_id').DataTable({ "pageLength": 10, select: { style: 'multi' }, "lengthChange": false, + dom: 'Bfrtip', + buttons: [ + 'selectAll', + 'selectNone' + ], language: { "processing": "Подождите...", "search": "Поиск:", @@ -25,11 +30,31 @@ $(document).ready(function () { "aria": { "sortAscending": ": активировать для сортировки столбца по возрастанию", "sortDescending": ": активировать для сортировки столбца по убыванию" - } - } + }, + "buttons": { + "selectAll": "Выбрать всё", + "selectNone": "Убрать выделение" + } + }, + columnDefs: [ { + orderable: false, + className: 'select-checkbox', + targets: 0 + } ], + select: { + style: 'multi' + }, + order: [[ 1, 'asc' ]] }); - $('tbody tr[data-href]').addClass('clickable').click( function() { - window.location = $(this).attr('data-href'); + var table = $('#table_id').DataTable(); + + $('#table_id tbody').on( 'click', 'tr', function () { + $(this).toggleClass('selected'); }); + + +// $('tbody tr[data-href]').addClass('clickable').click( function() { +// window.location = $(this).attr('data-href'); +// }); }); diff --git a/src/main/resources/templates/conferences/conferences.html b/src/main/resources/templates/conferences/conferences.html index 999010f..0ddbe5f 100644 --- a/src/main/resources/templates/conferences/conferences.html +++ b/src/main/resources/templates/conferences/conferences.html @@ -3,18 +3,15 @@ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorator="default"> - - + + +
- нажать
@@ -29,6 +26,7 @@ + @@ -37,6 +35,7 @@ + @@ -44,6 +43,7 @@ +
Название: Описание: Начало:
Конференция 1 Описание 1 01.01.2000
Конференция 2 Описание 2 01.02.2001