added not working button for user removing

This commit is contained in:
Václav Šmejkal 2024-05-20 20:51:06 +02:00
parent d101bab147
commit ab264d780f
Signed by: ENGO150
GPG Key ID: 4A57E86482968843
2 changed files with 20 additions and 2 deletions

View File

@ -3,10 +3,12 @@
Zde budou uživatelé. Zde budou uživatelé.
</div> </div>
<div id="right_panel"> <div id="right_panel">
B <button id="remove_btn">Odstranit Uživatele</button>
</div> </div>
</div> </div>
<script> <script>
let right_panel_buffer = null;
$.ajax $.ajax
({ ({
url: "./res/forum/api/list_users.php", url: "./res/forum/api/list_users.php",
@ -18,12 +20,14 @@
$("#left_panel").on("click", ".output", function(event) $("#left_panel").on("click", ".output", function(event)
{ {
if (right_panel_buffer == null) right_panel_buffer = document.getElementById("right_panel").innerHTML;
$.ajax $.ajax
({ ({
url: "./res/forum/api/user_info.php?username=" + event.target.innerHTML, url: "./res/forum/api/user_info.php?username=" + event.target.innerHTML,
success: function(result) success: function(result)
{ {
$("#right_panel").html(result); $("#right_panel").html(result + right_panel_buffer);
} }
}); });
}); });

View File

@ -74,3 +74,17 @@ img:hover
{ {
margin-top: 1.5vh; margin-top: 1.5vh;
} }
#remove_btn
{
position: absolute;
bottom: 0.3vh;
right: 0.3vh;
width: 10%;
padding: 0.3vh;
background-color: #9E6812;
border: 1px solid #3E392F;
color: #C1BFBE;
border-radius: 0.3vh 0.3vh;
}