|
|
|
@ -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"));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|