diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js index 78ca816119..ad17dd3a2e 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/holds.js +++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js @@ -791,14 +791,6 @@ $(document).ready(function () { } }); - // if (!patron_page) { - // $(".holds_table .select_hold_all").each(function () { - // var table = $(this).parents(".holds_table"); - // var count = $(".select_hold:not(:checked)", table).length; - // $(".select_hold_all", table).prop("checked", !count); - // }); - // } - function updateSelectedHoldsButtonCounters() { $(".move_selected_holds").html( MSG_MOVE_SELECTED.format( @@ -1639,79 +1631,47 @@ async function load_patron_holds_table(biblio_id, split_data) { orderable: false, searchable: false, render: function (data, type, row, meta) { + const group_hold_message = row.hold_group_id + ? `
'
+ );
if (toPosition == "up") {
moveTo = parseInt(priority) - 1;
}
@@ -2309,15 +2272,18 @@ async function load_patron_holds_table(biblio_id, split_data) {
if (toPosition == "bottom") {
moveTo = totalHolds;
}
+ $(this).parent().html($spinner);
$.ajax({
method: "PUT",
url:
"/api/v1/holds/" + encodeURIComponent(res_id) + "/priority",
data: JSON.stringify(moveTo),
success: function (data) {
+ $spinner.remove();
holdsQueueTable.api().ajax.reload(null, false);
},
error: function (jqXHR, textStatus, errorThrown) {
+ $spinner.remove();
alert(
"There was an error:" + textStatus + " " + errorThrown
);