mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 05:13:18 -07:00
Added in deletion of requests
This commit is contained in:
parent
cedd58f372
commit
754ace42b0
7 changed files with 103 additions and 75 deletions
|
@ -13,6 +13,34 @@ var tvimer = 0;
|
|||
movieLoad();
|
||||
tvLoad();
|
||||
|
||||
$(document).on("click", ".delete", function (e) {
|
||||
e.preventDefault();
|
||||
var buttonId = e.target.id;
|
||||
var $form = $('#form' + buttonId);
|
||||
|
||||
$.ajax({
|
||||
type: $form.prop('method'),
|
||||
url: $form.prop('action'),
|
||||
data: $form.serialize(),
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
if (response.result === true) {
|
||||
generateNotify("Success!", "success");
|
||||
|
||||
$("#" + buttonId + "Template").html("");
|
||||
} else {
|
||||
generateNotify(response.message, "warning");
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
function movieLoad() {
|
||||
$("#movieList").html("");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue