From a236fc50bc34047193c735fa03c8cb78ef2197d5 Mon Sep 17 00:00:00 2001 From: Nightblade73 Date: Sat, 16 Mar 2019 14:39:56 +0400 Subject: [PATCH 01/17] #53 added datatables lib support --- .../templates/conferences/conferences.html | 44 +++++++++++++++++-- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/src/main/resources/templates/conferences/conferences.html b/src/main/resources/templates/conferences/conferences.html index ab9fd31..d4c171b 100644 --- a/src/main/resources/templates/conferences/conferences.html +++ b/src/main/resources/templates/conferences/conferences.html @@ -3,18 +3,56 @@ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorator="default"> + + + -
- нажать -
+
+
+
+
+

Редактирование конференции

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + +
Column 1Column 2
Row 1 Data 1Row 1 Data 2
Row 2 Data 1Row 2 Data 2
+
+
+
+
+
+ + \ No newline at end of file From 6296b661a9dc620a55cee520ee89aadf21b013ef Mon Sep 17 00:00:00 2001 From: Nightblade73 Date: Sat, 16 Mar 2019 14:44:34 +0400 Subject: [PATCH 02/17] #53 added conference js file --- src/main/resources/public/js/conference.js | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/main/resources/public/js/conference.js diff --git a/src/main/resources/public/js/conference.js b/src/main/resources/public/js/conference.js new file mode 100644 index 0000000..e21cb7a --- /dev/null +++ b/src/main/resources/public/js/conference.js @@ -0,0 +1,3 @@ +$(document).ready(function () { + $('#table_id').dataTable(); +}); From fd22aecd22b340eab42c0947e2802889f6c802b7 Mon Sep 17 00:00:00 2001 From: Nightblade73 Date: Mon, 18 Mar 2019 18:41:59 +0400 Subject: [PATCH 03/17] #53 added supporting bootstrap style --- src/main/resources/public/css/conference.css | 47 +++++++++---------- src/main/resources/public/js/conference.js | 8 +++- .../templates/conferences/conferences.html | 28 ++++++----- 3 files changed, 47 insertions(+), 36 deletions(-) diff --git a/src/main/resources/public/css/conference.css b/src/main/resources/public/css/conference.css index 06d8041..630e31f 100644 --- a/src/main/resources/public/css/conference.css +++ b/src/main/resources/public/css/conference.css @@ -1,94 +1,93 @@ -.col-lg-12 a{ +.col-lg-12 a { position: absolute; font-size: smaller; } -.col-lg-12 a img{ +.col-lg-12 a img { width: 36px; height: 33px; } -.form-group textarea{ +.form-group textarea { min-height: 206px; max-height: 463px; } -.deadline-list{ +.deadline-list { height: 200px; padding: 0px; overflow-y: scroll; } -.deadline{ +.deadline { margin: 0; } -.deadline-text{ +.deadline-text { flex: 1; } -.member-list{ +.member-list { height: 200px; padding: 0px; overflow-y: scroll; } -.member{ +.member { margin: 0; } -.paper-list{ +.paper-list { height: 200px; padding: 0px; overflow-y: scroll; } -.paper{ +.paper { margin: 0; } -.paper-name{ +.paper-name { flex: 1; } -.paper-name span{ +.paper-name span { margin: 6px 15px; display: inline-block; } -.icon{ +.icon { width: 38px; height: 38px; padding: 2px; cursor: pointer; } -.icon-delete{ +.icon-delete { background-color: #f44; } -.icon-paper{ - height: 26px; - width: 26px; - float: right; - margin: 5px; +.icon-paper { + height: 26px; + width: 26px; + float: right; + margin: 5px; } -.grey-border{ +.grey-border { color: #495057; background-clip: padding-box; border: 1px solid #ced4da; border-radius: .25rem; - transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; + transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out; } -#add-paper{ +#add-paper { margin-left: 10px; } -#cancel-button{ +#cancel-button { position: relative; font-size: 1rem; } - diff --git a/src/main/resources/public/js/conference.js b/src/main/resources/public/js/conference.js index e21cb7a..399cde9 100644 --- a/src/main/resources/public/js/conference.js +++ b/src/main/resources/public/js/conference.js @@ -1,3 +1,9 @@ $(document).ready(function () { - $('#table_id').dataTable(); + $('#table_id').dataTable({ + "pageLength": 10, + select: { + style: 'multi' + }, + "lengthChange": false + }); }); diff --git a/src/main/resources/templates/conferences/conferences.html b/src/main/resources/templates/conferences/conferences.html index d4c171b..1a024fe 100644 --- a/src/main/resources/templates/conferences/conferences.html +++ b/src/main/resources/templates/conferences/conferences.html @@ -3,8 +3,8 @@ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorator="default"> - - + + @@ -25,24 +25,30 @@
-
- - + +
- - + + + + - - + + + + - - + + + + +
Column 1Column 2Название:Описание:Начало:Конец:
Row 1 Data 1Row 1 Data 2Конференция 1Описание 101.01.200002.01.2000
Row 2 Data 1Row 2 Data 2Конференция 2Описание 201.02.200102.02.2001
From 5dc54dda8b795f351956463af69d9d606c1f2c05 Mon Sep 17 00:00:00 2001 From: Nightblade73 Date: Tue, 19 Mar 2019 15:08:45 +0400 Subject: [PATCH 04/17] #53 added supporting russian language, added linkable row in table --- src/main/resources/public/js/conference.js | 28 ++++++++++++++++++- .../templates/conferences/conferences.html | 7 +++-- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/main/resources/public/js/conference.js b/src/main/resources/public/js/conference.js index 399cde9..35e3c42 100644 --- a/src/main/resources/public/js/conference.js +++ b/src/main/resources/public/js/conference.js @@ -4,6 +4,32 @@ $(document).ready(function () { select: { style: 'multi' }, - "lengthChange": false + "lengthChange": false, + language: { + "processing": "Подождите...", + "search": "Поиск:", + "lengthMenu": "Показать _MENU_ записей", + "info": "Записи с _START_ до _END_ из _TOTAL_ записей", + "infoEmpty": "Записи с 0 до 0 из 0 записей", + "infoFiltered": "(отфильтровано из _MAX_ записей)", + "infoPostFix": "", + "loadingRecords": "Загрузка записей...", + "zeroRecords": "Записи отсутствуют.", + "emptyTable": "В таблице отсутствуют данные", + "paginate": { + "first": "Первая", + "previous": "Предыдущая", + "next": "Следующая", + "last": "Последняя" + }, + "aria": { + "sortAscending": ": активировать для сортировки столбца по возрастанию", + "sortDescending": ": активировать для сортировки столбца по убыванию" + } + } + }); + + $('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 1a024fe..999010f 100644 --- a/src/main/resources/templates/conferences/conferences.html +++ b/src/main/resources/templates/conferences/conferences.html @@ -19,7 +19,7 @@
-

Редактирование конференции

+

Список конференций


@@ -36,13 +36,14 @@ - + Конференция 1 Описание 1 01.01.2000 02.01.2000 + - + Конференция 2 Описание 2 01.02.2001 From 1364e8e84d9c8276f14cd78db010c1d159d545e1 Mon Sep 17 00:00:00 2001 From: Nightblade73 Date: Wed, 20 Mar 2019 16:48:55 +0400 Subject: [PATCH 05/17] #53 added multi selection, added selection of all items --- src/main/resources/public/js/conference.js | 35 ++++++++++++++++--- .../templates/conferences/conferences.html | 16 ++++----- 2 files changed, 38 insertions(+), 13 deletions(-) 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 @@ + From cb673d87829c3d66eb98386bd8c621b722a27cf8 Mon Sep 17 00:00:00 2001 From: Nightblade73 Date: Wed, 20 Mar 2019 18:33:15 +0400 Subject: [PATCH 06/17] #53 remake of conference list without table --- src/main/resources/public/css/conference.css | 19 ++++++ src/main/resources/public/js/conference.js | 60 +------------------ .../templates/conferences/conferences.html | 48 ++++----------- 3 files changed, 34 insertions(+), 93 deletions(-) diff --git a/src/main/resources/public/css/conference.css b/src/main/resources/public/css/conference.css index 630e31f..f9e9944 100644 --- a/src/main/resources/public/css/conference.css +++ b/src/main/resources/public/css/conference.css @@ -1,3 +1,22 @@ +.conference-list-body { + height: 500px; +} + +.conference-item { + align-items: center; + justify-content: center; +} + +.form-check { + padding: 0; +} + +.form-check input { + margin: 10px; +} + + + .col-lg-12 a { position: absolute; font-size: smaller; diff --git a/src/main/resources/public/js/conference.js b/src/main/resources/public/js/conference.js index 1b3b7f9..1056bec 100644 --- a/src/main/resources/public/js/conference.js +++ b/src/main/resources/public/js/conference.js @@ -1,60 +1,6 @@ $(document).ready(function () { - $('#table_id').DataTable({ - "pageLength": 10, - select: { - style: 'multi' - }, - "lengthChange": false, - dom: 'Bfrtip', - buttons: [ - 'selectAll', - 'selectNone' - ], - language: { - "processing": "Подождите...", - "search": "Поиск:", - "lengthMenu": "Показать _MENU_ записей", - "info": "Записи с _START_ до _END_ из _TOTAL_ записей", - "infoEmpty": "Записи с 0 до 0 из 0 записей", - "infoFiltered": "(отфильтровано из _MAX_ записей)", - "infoPostFix": "", - "loadingRecords": "Загрузка записей...", - "zeroRecords": "Записи отсутствуют.", - "emptyTable": "В таблице отсутствуют данные", - "paginate": { - "first": "Первая", - "previous": "Предыдущая", - "next": "Следующая", - "last": "Последняя" - }, - "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 0ddbe5f..2d2c1c8 100644 --- a/src/main/resources/templates/conferences/conferences.html +++ b/src/main/resources/templates/conferences/conferences.html @@ -3,11 +3,7 @@ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorator="default"> - - - + @@ -22,37 +18,17 @@
-
-
Название: Описание: Начало:
Конференция 1 Описание 1 01.01.2000
Конференция 2 Описание 2 01.02.2001
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Название:Описание:Начало:Конец:
Конференция 1Описание 101.01.200002.01.2000
Конференция 2Описание 201.02.200102.02.2001
- +
+
+
+ +
+
+
Конференция 1
+
01.01.1990
+
+
+
From 89e0d1a291f8269891bc3c857702aa3623464ad7 Mon Sep 17 00:00:00 2001 From: Nightblade73 Date: Wed, 20 Mar 2019 21:15:45 +0400 Subject: [PATCH 07/17] #53 customization css styles --- src/main/resources/public/css/conference.css | 18 +++++++++++++++++- src/main/resources/public/js/conference.js | 2 +- .../templates/conferences/conferences.html | 5 ++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/main/resources/public/css/conference.css b/src/main/resources/public/css/conference.css index f9e9944..bfa1e73 100644 --- a/src/main/resources/public/css/conference.css +++ b/src/main/resources/public/css/conference.css @@ -7,12 +7,28 @@ justify-content: center; } +.conference-item:hover { + background-color: #eee; +} + .form-check { padding: 0; } .form-check input { - margin: 10px; + margin: 10px 5px; +} + +.conference-info:hover { + cursor: pointer; +} + +.conference-item:hover .form-check { + background-color: #ddd; +} + +.conference-item:hover .form-check:hover { + background-color: #ccc; } diff --git a/src/main/resources/public/js/conference.js b/src/main/resources/public/js/conference.js index 1056bec..04eba51 100644 --- a/src/main/resources/public/js/conference.js +++ b/src/main/resources/public/js/conference.js @@ -1,6 +1,6 @@ $(document).ready(function () { - $('tbody tr[data-href]').addClass('clickable').click( function() { + $('.conference-info').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 2d2c1c8..ce322df 100644 --- a/src/main/resources/templates/conferences/conferences.html +++ b/src/main/resources/templates/conferences/conferences.html @@ -23,7 +23,10 @@
-
+
+ +
+
Конференция 1
01.01.1990
From d356c219449c9411c29713d5f1c015e05ecc7caf Mon Sep 17 00:00:00 2001 From: Nightblade73 Date: Thu, 21 Mar 2019 09:55:38 +0400 Subject: [PATCH 08/17] #53 added buttons, added bottom pagination --- src/main/resources/public/css/conference.css | 9 +++++++ .../templates/conferences/conferences.html | 25 +++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/main/resources/public/css/conference.css b/src/main/resources/public/css/conference.css index bfa1e73..af5b7aa 100644 --- a/src/main/resources/public/css/conference.css +++ b/src/main/resources/public/css/conference.css @@ -1,3 +1,11 @@ +.dashboard { + margin-bottom: 10px; +} + +.dashboard button{ + margin-left: 10px; +} + .conference-list-body { height: 500px; } @@ -5,6 +13,7 @@ .conference-item { align-items: center; justify-content: center; + padding: 0; } .conference-item:hover { diff --git a/src/main/resources/templates/conferences/conferences.html b/src/main/resources/templates/conferences/conferences.html index ce322df..2afc7d9 100644 --- a/src/main/resources/templates/conferences/conferences.html +++ b/src/main/resources/templates/conferences/conferences.html @@ -16,10 +16,22 @@

+
+
+
+
+ +
+ + + +
+
+
-
-
+
+
@@ -34,6 +46,15 @@
+
+ +
+
+ +
- \ No newline at end of file + + diff --git a/src/main/resources/templates/conferences/fragments/confDashboardFragment.html b/src/main/resources/templates/conferences/fragments/confDashboardFragment.html new file mode 100644 index 0000000..080946c --- /dev/null +++ b/src/main/resources/templates/conferences/fragments/confDashboardFragment.html @@ -0,0 +1,21 @@ + + + + + + +
+
+
+ +
+
+ title +

+
+
+
+ + + + \ No newline at end of file diff --git a/src/main/resources/templates/conferences/fragments/confLineFragment.html b/src/main/resources/templates/conferences/fragments/confLineFragment.html new file mode 100644 index 0000000..f54a777 --- /dev/null +++ b/src/main/resources/templates/conferences/fragments/confLineFragment.html @@ -0,0 +1,23 @@ + + + + + + +
+ +
+ + + + \ No newline at end of file