From 67d310b4d6e531a17604683fa5c07ef986d9f0d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=A4is=C3=A4?= Date: Thu, 22 May 2025 14:36:38 +0300 Subject: [PATCH] Bug 23269: Add datatable fixes --- koha-tmpl/intranet-tmpl/prog/js/holds.js | 26 +++++++----------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js index e2e4fd3ede..07ae330b77 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/holds.js +++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js @@ -730,13 +730,6 @@ async function load_patron_holds_table(biblio_id, split_data) { url: url, data: function (params) { pageStart = params.start; - var query = { - _per_page: params.length, - _page: params.start / params.length + 1, - _order_by: "priority", - _match: "exact", - }; - return query; }, }, embed: ["patron", "item", "item_group"], @@ -767,7 +760,7 @@ async function load_patron_holds_table(biblio_id, split_data) { }, { data: "priority", - orderable: false, + orderable: true, searchable: false, render: function (data, type, row, meta) { let select = @@ -895,7 +888,7 @@ async function load_patron_holds_table(biblio_id, split_data) { }, { data: "patron.cardnumber", - orderable: false, + orderable: true, searchable: true, render: function (data, type, row, meta) { if (data == null) { @@ -926,7 +919,7 @@ async function load_patron_holds_table(biblio_id, split_data) { }, { data: "hold_date", - orderable: false, + orderable: true, searchable: false, render: function (data, type, row, meta) { if (AllowHoldDateInFuture) { @@ -946,7 +939,7 @@ async function load_patron_holds_table(biblio_id, split_data) { }, { data: "expiration_date", - orderable: false, + orderable: true, searchable: false, render: function (data, type, row, meta) { return ( @@ -962,7 +955,7 @@ async function load_patron_holds_table(biblio_id, split_data) { }, { data: "pickup_library_id", - orderable: false, + orderable: true, searchable: false, render: function (data, type, row, meta) { var branchSelect = @@ -1140,7 +1133,7 @@ async function load_patron_holds_table(biblio_id, split_data) { if (row.suspended) { td += ' ' + - __("Resume") + + __("Unsuspend") + ""; } else { td += @@ -1207,12 +1200,6 @@ async function load_patron_holds_table(biblio_id, split_data) { hold_table_settings ); $(table_id).on("draw.dt", function () { - // Remove the search box. Don't know why it isn't working in the table settings - $(this).parent().find(".pager .table_controls .dt-search").remove(); - $(this) - .parent() - .find(".pager .table_controls .dt-buttons .dt_button_clear_filter") - .remove(); var MSG_CANCEL_SELECTED = _("Cancel selected (%s)"); $(".cancel_selected_holds").html( MSG_CANCEL_SELECTED.format( @@ -1380,6 +1367,7 @@ async function load_patron_holds_table(biblio_id, split_data) { data: JSON.stringify(req), success: function (data) { holdsQueueTable.api().ajax.reload(null, false); + $(instance.input).attr("data-current-date", dateStr); }, error: function (jqXHR, textStatus, errorThrown) { holdsQueueTable.api().ajax.reload(null, false); -- 2.34.1