Bugzilla – Attachment 176000 Details for
Bug 37334
Cannot filter holdings table by status
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37334: Allow a column filter to be shown even searchable is off
Bug-37334-Allow-a-column-filter-to-be-shown-even-s.patch (text/plain), 1.66 KB, created by
Lucas Gass (lukeg)
on 2024-12-30 15:31:37 UTC
(
hide
)
Description:
Bug 37334: Allow a column filter to be shown even searchable is off
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-12-30 15:31:37 UTC
Size:
1.66 KB
patch
obsolete
>From 1e0cdf6d17c3613752c27618b0e5dfb81dfbde18 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 2 Oct 2024 14:50:54 +0200 >Subject: [PATCH] Bug 37334: Allow a column filter to be shown even searchable > is off > >We do not want to use the usual filtering method here, we are building >the query from "additional filters" > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index 8b342d7cb0..62d3956343 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -805,9 +805,10 @@ function _dt_add_filters(table_node, table_dt, filters_options = {}) { > let i = column.index(); > var visible_i = table_dt.column.index('fromData', i); > let th = $(table_node).find('thead tr:eq(1) th:eq(%s)'.format(visible_i)); >- var is_searchable = columns[i].bSearchable; >- $(th).removeClass('sorting').removeClass("sorting_asc").removeClass("sorting_desc"); >- if ( is_searchable ) { >+ var is_searchable = table_dt.settings()[0].aoColumns[i].bSearchable; >+ $(this).removeClass('sorting').removeClass("sorting_asc").removeClass("sorting_desc"); >+ $(this).data('th-id', i); >+ if ( is_searchable || $(this).data('filter') || filters_options[i] ) { > let input_type = 'input'; > let existing_search = column.search(); > if ( $(th).data('filter') || filters_options.hasOwnProperty(i)) { >-- >2.39.2
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 37334
:
172300
|
172301
|
172302
|
173499
|
173500
|
173501
|
173949
|
173950
|
173951
|
173982
|
174310
|
174798
|
174799
|
174800
|
174801
|
174802
|
174803
|
174804
|
174813
|
174814
|
174901
|
174902
|
174903
|
174955
|
175859
|
175860
|
175861
|
175862
|
175863
|
175864
|
175865
|
175866
|
175867
|
175868
|
175869
|
175870
|
175871
|
175999
|
176000
|
176001
|
176002
|
176003
|
176004
|
176005
|
176006
|
176007
|
176008
|
176009
|
176010
|
176011
|
176023
|
176024
|
176025
|
176026
|
176027
|
176028
|
176029
|
176030
|
176031
|
176032
|
176033
|
176034
|
176035
|
176475
|
176477
|
176480
|
176481
|
177321
|
177415
|
177416
|
177417
|
177418
|
177419
|
177420
|
177421
|
177422
|
177423
|
177424
|
177425
|
177426
|
177427
|
177428
|
177429
|
177430
|
177431
|
177432