Bugzilla – Attachment 87807 Details for
Bug 22175
Make stock rotation table sortable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22175: (follow-up) Identify columns to exclude from export
Bug-22175-follow-up-Identify-columns-to-exclude-fr.patch (text/plain), 4.06 KB, created by
Owen Leonard
on 2019-04-11 18:56:10 UTC
(
hide
)
Description:
Bug 22175: (follow-up) Identify columns to exclude from export
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2019-04-11 18:56:10 UTC
Size:
4.06 KB
patch
obsolete
>From 89bda365f90b0c722013d8ced84021c86ee16305 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 11 Apr 2019 18:49:13 +0000 >Subject: [PATCH] Bug 22175: (follow-up) Identify columns to exclude from > export > >Bug 21216 added a way to designate DataTables columns to include in >export operations (Copy, CSV, print, etc). However, this solution did >not take hidden columns into account. This patch revises the global >columns configuration settings so that exports will include only visible >columns and will exclude columns with a "noExport" class on the <th>. > >To test, apply the patch and clear your browser cache if necessary. > > - Go to Tools -> Stock rotation > - In the table of rotas, hide some columns in the table and verify that > export operations include only your visible selections, excluding the > last column with buttons. > - Choose a rota and select Manage -> Items. Test that this table works > in the same way. >--- > koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt | 6 +++--- > koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js | 2 -- > 3 files changed, 4 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >index e9461f3..6d1bf6a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >@@ -21,7 +21,7 @@ function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) { > counter++; > }); > >- var exportColumns = ":visible"; >+ var exportColumns = ":visible:not(.noExport)"; > if( dt_parameters.hasOwnProperty("exportColumns") ){ > // A custom buttons configuration has been passed from the page > exportColumns = dt_parameters["exportColumns"]; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt >index 719dac4..6be2492 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt >@@ -64,7 +64,7 @@ > <th>Active</th> > <th>Description</th> > <th>Number of items</th> >- <th class="NoSort"> </th> >+ <th class="NoSort noExport"> </th> > </tr> > </thead> > <tbody> >@@ -372,8 +372,8 @@ > <th>Author</th> > <th>Call number</th> > <th class="NoSearch">In transit</th> >- <th class="NoSort">Stages & duration in days<br>(current stage highlighted)</th> >- <th class="NoSort"> </th> >+ <th class="NoSort noExport">Stages & duration in days<br>(current stage highlighted)</th> >+ <th class="NoSort noExport"> </th> > </tr> > </thead> > <tbody> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js b/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js >index b9493df..df2fbcd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js >@@ -72,7 +72,6 @@ $(document).ready(function() { > ], > "sPaginationType": "four_button", > "autoWidth": false, >- "exportColumns": [0,1,2,3,4,5] > }, stock_rotation_items_columns_settings); > > KohaTable("stock_rotation", { >@@ -82,7 +81,6 @@ $(document).ready(function() { > ], > "sPaginationType": "four_button", > "autoWidth": false, >- "exportColumns": [0,1,2,3,4] > }, stock_rotation_columns_settings); > > }); >-- >2.1.4
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 22175
:
84406
|
84421
|
84637
|
84897
|
87807
|
87847
|
87848