From 591f3398ea44552655155e806f403962d32f2c19 Mon Sep 17 00:00:00 2001 From: Sergey Date: Mon, 5 May 2025 00:10:50 +0300 Subject: [PATCH 1/3] Project-front complete --- src/main/webapp/html/my.html | 370 ++++++++++++++++++++++++++++++++++- 1 file changed, 368 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/html/my.html b/src/main/webapp/html/my.html index eb66ac55..0c153c70 100644 --- a/src/main/webapp/html/my.html +++ b/src/main/webapp/html/my.html @@ -1,11 +1,377 @@ - + + RPG + + -

RPG admin panel

+

RPG admin pane

+

Accounts list:

+
+ Count per page: + + + +
+ + + + + + + + + + + + + + + + + +
#NameTitleRaceProfessionLevelBirthdayBannedEditDelete
+
+ +
+
+
+

Create new account:

+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ \ No newline at end of file From 3586aa77e8baf1449067369a13b8bf7ae6508323 Mon Sep 17 00:00:00 2001 From: Sergey Date: Mon, 5 May 2025 00:13:35 +0300 Subject: [PATCH 2/3] Project-front complete --- src/main/webapp/html/my.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/html/my.html b/src/main/webapp/html/my.html index 0c153c70..defe7883 100644 --- a/src/main/webapp/html/my.html +++ b/src/main/webapp/html/my.html @@ -12,8 +12,8 @@ getPagination(); }) $('#pagination').on('click', '.page-btn', function () { - $('.page-btn').removeClass('active'); // Сброс всех активных состояний - $(this).addClass('active'); // Подсветка текущей кнопки + $('.page-btn').removeClass('active'); + $(this).addClass('active'); getPage(); }); $('#createAccount').on('click', function () { From d18afb51f629af068e1bbf44431d10bbb2c619ea Mon Sep 17 00:00:00 2001 From: Sergey Date: Mon, 5 May 2025 06:44:40 +0300 Subject: [PATCH 3/3] Project-front complete --- src/main/webapp/html/my.html | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/main/webapp/html/my.html b/src/main/webapp/html/my.html index defe7883..c642d409 100644 --- a/src/main/webapp/html/my.html +++ b/src/main/webapp/html/my.html @@ -83,11 +83,17 @@ function getPagination() { $('#pagination').empty(); - $.get('rest/players/count', response => { - let pages = response / parseInt($('#pet-select').val()) - pages = Math.ceil(pages); - for (let i = 1; i <= pages; i++) { - $('#pagination').append(``); + $.ajax({ + url: 'rest/players/count', + type: 'GET', + async: false, + success: function(response) { + let pages = response / parseInt($('#pet-select').val()); + pages = Math.ceil(pages); + for (let i = 1; i <= pages; i++) { + $('#pagination').append(``); + } + $('#pagination').children().eq(0).addClass('active'); } }); } @@ -97,8 +103,11 @@ url: `rest/players/${id}`, type: 'DELETE', success: function (response) { + const pageNumber = $('#pagination button.active').text() - 1; getPage() getPagination() + $('#pagination').children().eq(0).removeClass('active'); + $('#pagination').children().eq(pageNumber).addClass('active'); } }); }