Mass change book title and author (fix #1996)

This commit is contained in:
Ozzie Isaacs
2021-05-28 18:22:29 +02:00
parent e8a4c3c6b9
commit a79600c81f
3 changed files with 74 additions and 8 deletions

View File

@ -46,9 +46,14 @@ $(function() {
if (selections.length < 1) {
$("#delete_selection").addClass("disabled");
$("#delete_selection").attr("aria-disabled", true);
$("#table_xchange").addClass("disabled");
$("#table_xchange").attr("aria-disabled", true);
} else {
$("#delete_selection").removeClass("disabled");
$("#delete_selection").attr("aria-disabled", false);
$("#table_xchange").removeClass("disabled");
$("#table_xchange").attr("aria-disabled", false);
}
});
$("#delete_selection").click(function() {
@ -86,6 +91,20 @@ $(function() {
});
});
$("#table_xchange").click(function() {
$.ajax({
method:"post",
contentType: "application/json; charset=utf-8",
dataType: "json",
url: window.location.pathname + "/../../ajax/xchange",
data: JSON.stringify({"xchange":selections}),
success: function success() {
$("#books-table").bootstrapTable("refresh");
$("#books-table").bootstrapTable("uncheckAll");
}
});
});
var column = [];
$("#books-table > thead > tr > th").each(function() {
var element = {};