Bugzilla – Attachment 175380 Details for
Bug 38632
holdings table - all columns shown when displaying the filters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38632: Do not show all columns when displaying the filters
Bug-38632-Do-not-show-all-columns-when-displaying-.patch (text/plain), 2.19 KB, created by
Brendan Lawlor
on 2024-12-11 20:01:12 UTC
(
hide
)
Description:
Bug 38632: Do not show all columns when displaying the filters
Filename:
MIME Type:
Creator:
Brendan Lawlor
Created:
2024-12-11 20:01:12 UTC
Size:
2.19 KB
patch
obsolete
>From cf97437f96c933d7984c7ebb3cb54f2fa62a976f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 9 Dec 2024 12:19:45 +0100 >Subject: [PATCH] Bug 38632: Do not show all columns when displaying the > filters > >Yet another visibility bug fix for this specific table. >When the filters are displayed the table is destroyed and recreated. >We should not save the visibility changes made by DT and consider them >changes made by the user. >A temporary variable is used to store the user settings duringt this >action, then we restore them once it's done. > >Test plan: >Go to the detail page of bibliographic record with items >Click on "show filters" >=> Only columns displayed should still be displayed >Retry but show/hide some columns before you display the filters >=> Only columns displayed should still be displayed > >Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> >--- > .../en/includes/html_helpers/tables/items/catalogue_detail.inc | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >index f6ce0667c3..f70f9b716d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >@@ -275,12 +275,15 @@ > function build_items_table (tab_id, add_filters, dt_options, drawcallback) { > > if ( dt_options && dt_options.hasOwnProperty('destroy') ) { >+ // Keep a copy of the user settings, the destroy is going to trigger the column-visibility.dt event for all columns >+ let user_colvis_bak= Object.assign({}, user_colvis[tab_id]); > let table_id = "#"+tab_id+"_table"; > if( $.fn.dataTable.isDataTable(table_id) ) { > $(table_id).DataTable().destroy(); > } > $(table_id).replaceWith(table_nodes[tab_id]); > dt_options['destroy'] = null; >+ user_colvis[tab_id] = user_colvis_bak; > } > let default_filters = {}; > [% IF Koha.Preference('SeparateHoldings') %] >-- >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 38632
:
175296
|
175297
| 175380 |
175381