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>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0fefe2bed5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
dd9c0d846c
commit
5a2ac2285e
|
|
@ -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') %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue