Bugzilla – Attachment 179120 Details for
Bug 38472
exportColumns hard-coded in patron categories, patron restriction types, and basket tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38472: Remove kohaTable's exportColumns option
Bug-38472-Remove-kohaTables-exportColumns-option.patch (text/plain), 7.00 KB, created by
Jonathan Druart
on 2025-03-10 14:41:38 UTC
(
hide
)
Description:
Bug 38472: Remove kohaTable's exportColumns option
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-03-10 14:41:38 UTC
Size:
7.00 KB
patch
obsolete
>From b74aa530f8448ed5c753ab7e5066ea6ffe3e2bee Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 28 Jan 2025 12:12:26 +0100 >Subject: [PATCH] Bug 38472: Remove kohaTable's exportColumns option > >We hardcode the id of the columns to export, we should use .noExport >instead on the columns we do not want to export. > >Test plan: >Confirm that the columns exported on the acqui/basket, admin/categories >and admin/restrictions pages are the same with and without this patch. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt | 5 ++--- > .../intranet-tmpl/prog/en/modules/admin/categories.tt | 2 +- > .../intranet-tmpl/prog/en/modules/admin/restrictions.tt | 8 ++++---- > koha-tmpl/intranet-tmpl/prog/js/categories.js | 1 - > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 4 ---- > koha-tmpl/intranet-tmpl/prog/js/restrictiontypes.js | 1 - > koha-tmpl/opac-tmpl/bootstrap/js/datatables.js | 4 ---- > 7 files changed, 7 insertions(+), 18 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >index e5296a9ab41..e80fda26c5c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -579,10 +579,10 @@ > [% END %] > <th class="NoSort">Place hold</th> > [% IF ( active && !closedate ) %] >- <th class="NoSort">Modify</th> >+ <th class="NoSort noExport">Modify</th> > [% END %] > [% IF !closedate || Koha.Preference('CancelOrdersInClosedBaskets') %] >- <th class="NoSort">Cancel order</th> >+ <th class="NoSort noExport">Cancel order</th> > [% END %] > </tr> > </thead> >@@ -1236,7 +1236,6 @@ > $("#orders").kohaTable({ > pagingType: "full", > autoWidth: false, >- exportColumns: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18[% IF (Koha.Preference('EDIFACT') && ediaccount) %],19[% END %]], > }, table_settings); > > $("#cancelledorderst").kohaTable({ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >index 74557724486..56d2dbf7312 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >@@ -667,7 +667,7 @@ > <th scope="col" data-colname="checkout_charge_limit">Checkout charge limit</th> > <th scope="col" data-colname="guarantees_checkout_charge_limit">Guarantees checkout charge limit</th> > <th scope="col" data-colname="guarantors_checkout_charge_limit">Guarantors with guarantees checkout charge limit</th> >- <th scope="col" data-colname="actions">Actions</th> >+ <th scope="col" class="noExport" data-colname="actions">Actions</th> > </tr> > </thead> > <tbody> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt >index 392129f0fa6..ed860b8a23a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt >@@ -194,10 +194,10 @@ > <tr> > <th scope="col">Code</th> > <th scope="col">Label</th> >- <th scope="col">Default</th> >- <th scope="col">Lift after payment?</th> >- <th scope="col">Fee limit</th> >- <th scope="col">Actions</th> >+ <th class="noExport" scope="col">Default</th> >+ <th class="noExport" scope="col">Lift after payment?</th> >+ <th class="noExport" scope="col">Fee limit</th> >+ <th class="noExport" scope="col">Actions</th> > </tr> > </thead> > <tbody> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/categories.js b/koha-tmpl/intranet-tmpl/prog/js/categories.js >index be4fc5923e1..d412f10c157 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/categories.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/categories.js >@@ -47,7 +47,6 @@ $(document).ready(function () { > }, > ], > pagingType: "full", >- exportColumns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], > bKohaColumnsUseNames: true, > }, > table_settings >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index f399ce4ae9d..ec0bb6f0ba1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -741,10 +741,6 @@ function _dt_buttons(params) { > let table_settings = params.table_settings; > > var exportColumns = ":visible:not(.noExport)"; >- if (settings.hasOwnProperty("exportColumns")) { >- // A custom buttons configuration has been passed from the page >- exportColumns = settings["exportColumns"]; >- } > > const export_format_spreadsheet = { > body: function (data, row, column, node) { >diff --git a/koha-tmpl/intranet-tmpl/prog/js/restrictiontypes.js b/koha-tmpl/intranet-tmpl/prog/js/restrictiontypes.js >index 224a2a2ecda..e87f41184e3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/restrictiontypes.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/restrictiontypes.js >@@ -40,7 +40,6 @@ $(document).ready(function () { > ], > order: [[1, "asc"]], > pagingType: "full", >- exportColumns: [0, 1], > }); > > $("#restriction_form").validate({ >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >index fac83429694..fca006ef645 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >@@ -111,10 +111,6 @@ function _dt_buttons(params) { > let table_settings = params.table_settings; > > var exportColumns = ":visible:not(.noExport)"; >- if (settings.hasOwnProperty("exportColumns")) { >- // A custom buttons configuration has been passed from the page >- exportColumns = settings["exportColumns"]; >- } > > var export_format = { > body: function (data, row, column, node) { >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38472
:
177260
|
177276
|
177277
|
177308
|
177309
|
177322
|
177323
| 179120 |
179121