From 872006005deaf327f698ce33935a5f91bd70b5c9 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 15 Feb 2023 15:30:04 +0000 Subject: [PATCH] Bug 32970: Use KohaTable for display of batch item modification results This patch updates the code to use KohaTables to provide export of the batch modification results. Additionally, searching is added, and the first two columns are made searchable To test: 1 - Perform a match item modification on several items 2 - View the results of the background job 3 - Apply patch 4 - Reload page 5 - Note you now have additional controls including 'search' and 'export' 6 - Test searching and exporting 7 - Confirm all work as expected Signed-off-by: Laura Escamilla Signed-off-by: Tomas Cohen Arazi --- .../intranet-tmpl/prog/en/modules/admin/background_jobs.tt | 1 + koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt index bfc291d3d8..16b76a833c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt @@ -4,6 +4,7 @@ [% USE KohaDates %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] +[% INCLUDE 'columns_settings.inc' %] [% IF op == 'view' %] Details of job #[% job.id | html %] › diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js b/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js index 56d5270a53..f8fe139ccf 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js +++ b/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js @@ -118,15 +118,14 @@ function hideAllColumns() { $(document).ready(function () { hideColumns(); - $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, { - "sDom": 't', + var items_table = KohaTable("itemst", { "aoColumnDefs": [ - { "aTargets": [0, 1], "bSortable": false, "bSearchable": false }, + { "aTargets": [0, 1], "bSortable": false, "bSearchable": true }, { "aTargets": [0], "bVisible": false }, { "sType": "anti-the", "aTargets": ["anti-the"] } ], "bPaginate": false, - })); + }); // Highlight in yellow item rows that cannot be deleted $(".error").parents('tr').find('td').css('background-color', '#ffff99'); -- 2.39.5