Bugzilla – Attachment 172807 Details for
Bug 33736
Add bookings to collect circulation report
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33736: Ensure datatable filter row takes visible into account
Bug-33736-Ensure-datatable-filter-row-takes-visibl.patch (text/plain), 1.61 KB, created by
Martin Renvoize (ashimema)
on 2024-10-16 09:40:33 UTC
(
hide
)
Description:
Bug 33736: Ensure datatable filter row takes visible into account
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-10-16 09:40:33 UTC
Size:
1.61 KB
patch
obsolete
>From 2b8d9a6e937a4cc5e43926bb6a21780258112b1e Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 16 Oct 2024 10:38:32 +0100 >Subject: [PATCH] Bug 33736: Ensure datatable filter row takes visible into > account > >We clone the header row, and then iterate it assuming the iterator index >lines up with the column definition index of the datatables settings. > >However, if a column is hidden, this is not the case. Said column will >not appear in the header row that's cloned and as such your iterator >will no longer line up with the column settings index number of the >settings array. >--- > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index 5f5d81a34f5..1d8bab6d336 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -822,7 +822,13 @@ function _dt_on_visibility(add_filters, table_node, table_dt){ > function _dt_add_filters(table_node, table_dt, filters_options = {}) { > $(table_node).find('thead tr').clone().appendTo( $(table_node).find('thead') ); > >+ let j = -1; > $(table_node).find('thead tr:eq(1) th').each( function (i) { >+ j++ >+ var is_visible = table_dt.settings()[0].aoColumns[j].bVisible; >+ if ( !is_visible ) { j++ } >+ i = j; >+ > var is_searchable = table_dt.settings()[0].aoColumns[i].bSearchable; > $(this).removeClass('sorting').removeClass("sorting_asc").removeClass("sorting_desc"); > $(this).data('th-id', i); >-- >2.47.0
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 33736
:
158356
|
161044
|
165014
|
165144
|
165277
|
165278
|
165279
|
165280
|
170398
|
170399
|
170400
|
172716
|
172717
|
172718
|
172719
|
172720
|
172721
|
172765
|
172807
|
172808
|
172810
|
172823
|
172836
|
172837
|
172838
|
172839
|
172840
|
172841
|
172842
|
172843
|
172844
|
172845
|
173291
|
173292
|
173293
|
173294
|
173295
|
173296
|
173297
|
173298
|
173299
|
173300
|
173301
|
173302
|
173303
|
174582