- add edit button

This commit is contained in:
2022-04-11 20:34:02 +02:00
parent 34a42822b2
commit 2d795b680b
5 changed files with 180 additions and 17 deletions

View File

@@ -93,8 +93,9 @@
<div style="width: 300px;">
<img src="<%= it.cover %>" alt="Cover image" style="width: 100%;"></img><br>
<center><%= it.titleByAPI %><br><i><%= it.id %></i><br>
<b>Art: </b> <%= it.type %></center>
</div>
<b>Type: </b> <%= it.type %></center>
</div><br>
<button onclick="handleEdit()" id="editBtn"><i class="fas fa-pen"></i> Edit</button>
<button onclick="handelDelete()" id="delBtn"><i class="fas fa-trash"></i> Delete</button>
<button onclick="window.location.href = '/'"><i class="fas fa-home"></i> Back to home</button>
</div>
@@ -111,6 +112,11 @@
document.getElementById("overlay2").style.display = "none";
}
function handleEdit(){
console.log("Editing movie")
window.location.href = '/editDetails?id=<%= it.id %>';
}
function sureDelete(){
console.log("Deleting movie")
url = "/delete?id=<%= it.internalID %>";