From c9cc66e99489ced9d68764777418a1e2ac3f5807 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 --- .../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 c482d0d74c..8bcbc35579 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 4d178d29d5..15bb86f4e8 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, - })); + }); $("#selectallbutton").click(function (e) { e.preventDefault(); $("#itemst input:checkbox").each(function () { -- 2.30.2