mirror of
https://github.com/JonathanHerrewijnen/calibre-web.git
synced 2024-11-11 05:33:57 +00:00
After Deleting a book the list page is still displayed #1938
This commit is contained in:
parent
fac232229e
commit
78071841cc
@ -142,10 +142,11 @@ $("#delete_confirm").click(function() {
|
||||
//get data-id attribute of the clicked element
|
||||
var deleteId = $(this).data("delete-id");
|
||||
var bookFormat = $(this).data("delete-format");
|
||||
var ajaxResponse = $(this).data("ajax");
|
||||
if (bookFormat) {
|
||||
window.location.href = getPath() + "/delete/" + deleteId + "/" + bookFormat;
|
||||
} else {
|
||||
if ($(this).data("delete-format")) {
|
||||
if (ajaxResponse) {
|
||||
path = getPath() + "/ajax/delete/" + deleteId;
|
||||
$.ajax({
|
||||
method:"get",
|
||||
@ -187,6 +188,7 @@ $("#deleteModal").on("show.bs.modal", function(e) {
|
||||
}
|
||||
$(e.currentTarget).find("#delete_confirm").data("delete-id", bookId);
|
||||
$(e.currentTarget).find("#delete_confirm").data("delete-format", bookfomat);
|
||||
$(e.currentTarget).find("#delete_confirm").data("ajax", $(e.relatedTarget).data("ajax"));
|
||||
});
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user