Bugzilla – Attachment 175625 Details for
Bug 38724
holdings table - filters shown after column visibility is updated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38724: Do not show the filters when updating col vis (if not needed)
Bug-38724-Do-not-show-the-filters-when-updating-co.patch (text/plain), 2.59 KB, created by
Brendan Lawlor
on 2024-12-17 14:36:04 UTC
(
hide
)
Description:
Bug 38724: Do not show the filters when updating col vis (if not needed)
Filename:
MIME Type:
Creator:
Brendan Lawlor
Created:
2024-12-17 14:36:04 UTC
Size:
2.59 KB
patch
obsolete
>From 9c987f37c6ad0839cd63062b6244be0e12a367e9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 17 Dec 2024 10:12:21 +0100 >Subject: [PATCH] Bug 38724: Do not show the filters when updating col vis (if > not needed) > >(In reply to Brendan Lawlor from bug 38632 comment #7) >> During testing I noticed small related bug in current main. On the >> bibliographic record details page if you click to configure columns and you >> add or remove a column it automatically shows the column filters too, but it >> does not toggle the filter link to 'Hide filters` so you have to click twice >> to hide them. > >Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> >--- > .../html_helpers/tables/items/catalogue_detail.inc | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >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..6f586bad2a 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 >@@ -173,6 +173,7 @@ > > }); > >+ let filters_shown = false; > $(document).ready(function() { > $(".show_filters").on("click",function(e){ > e.preventDefault(); >@@ -180,6 +181,7 @@ > let tab = $("#" + tab_id + "_panel" ); > tab.find(".show_filters").hide(); > tab.find(".hide_filters").show(); >+ filters_show = true; > $("#"+tab_id+"_table thead tr:eq(1)").remove(); > build_items_table(tab_id, true, { destroy: true }, build_items_table_drawncallback ); > itemSelectionBuildActionLinks(tab_id); >@@ -191,6 +193,7 @@ > let tab = $("#" + tab_id + "_panel" ); > tab.find(".hide_filters").hide(); > tab.find(".show_filters").show(); >+ filters_show = false; > $("#"+tab_id+"_table thead tr:eq(1)").remove(); > build_items_table(tab_id, false, { destroy: true }, build_items_table_drawncallback ); > itemSelectionBuildActionLinks(tab_id); >@@ -868,7 +871,9 @@ > table_dt.on("column-visibility.dt", function(e, settings, column, state, recalc ){ > if (recalc === false) return; > >- _dt_add_filters(this, table_dt, filters_options); >+ if ( filters_shown ) { >+ _dt_add_filters(this, table_dt, filters_options); >+ } > > user_colvis[tab_id][column] = state; > >-- >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 38724
:
175597
| 175625