Bugzilla – Attachment 177308 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), 6.97 KB, created by
David Nind
on 2025-01-29 11:12:10 UTC
(
hide
)
Description:
Bug 38472: Remove kohaTable's exportColumns option
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-01-29 11:12:10 UTC
Size:
6.97 KB
patch
obsolete
>From 210f1216e3ba46fd5abed48462a834ae16601426 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> >--- > 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 7241614b85..676eb0f294 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -525,10 +525,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> >@@ -1164,7 +1164,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 0eb945497c..5134e3991d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >@@ -647,7 +647,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 03f40db339..f92b48031c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt >@@ -195,10 +195,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 be4fc5923e..d412f10c15 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 a49e1d30f2..9313f9135c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -603,10 +603,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 9440b5dcb6..674e192a15 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/restrictiontypes.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/restrictiontypes.js >@@ -30,7 +30,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 3e9354c255..428c679a26 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >@@ -107,10 +107,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.39.5
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