mirror of
https://gitea.tendokyu.moe/Hay1tsme/artemis.git
synced 2026-02-14 03:37:29 +08:00
Rival Delete functionality
This commit is contained in:
12
titles/ongeki/frontend/js/rival_scripts.js
Normal file
12
titles/ongeki/frontend/js/rival_scripts.js
Normal file
@@ -0,0 +1,12 @@
|
||||
function deleteRival(rivalUserId){
|
||||
|
||||
$(document).ready(function () {
|
||||
$.post("/game/ongeki/rival.delete",
|
||||
{
|
||||
rivalUserId
|
||||
},
|
||||
function(data,status){
|
||||
window.location.replace("/game/ongeki/")
|
||||
})
|
||||
});
|
||||
}
|
||||
@@ -32,10 +32,10 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for rival in rival_info%}
|
||||
<tr>
|
||||
<tr id="{{rival.rivalUserId}}">
|
||||
<td>{{rival.rivalUserId}}</td>
|
||||
<td>{{rival.rivalUserName}}</td>
|
||||
<td><button class="btn-danger btn btn-sm">Delete</button></td>
|
||||
<td><button class="btn-danger btn btn-sm" onclick="deleteRival({{rival.rivalUserId}})">Delete</button></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
@@ -65,8 +65,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# <script>
|
||||
</script> #}
|
||||
<script>
|
||||
{% include 'titles/ongeki/frontend/js/rival_scripts.js' %}
|
||||
</script>
|
||||
{% else %}
|
||||
<h2>Not Currently Logged In</h2>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user