From 4c0190537dc9acd8530329bcc0737e38e33e2c03 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 21 Dec 2023 14:11:35 +0000 Subject: [PATCH] Bug 34574: Add CSS class to datatable select filter Test plan: 1) Create a new patron category, visit: /cgi-bin/koha/admin/categories.pl?op=add_form 2) Add a category code, en enrollment period, a category type and a really long description like: "This is a real long description of the patron category code for demo purposes" 3) Now do the same but for a library, visit: /cgi-bin/koha/admin/branches.pl?op=add_form 4) Add a library code and a really long name like: "This is a real long library name for demo purposes" 5) Visit patrons home: /cgi-bin/koha/members/members-home.pl 6) Hit "Search". Notice the "library" and "category" columns grow in width to match the largest option (added in previous steps) 7) Apply patch, add the following CSS to IntranetUserCSS: .dt-select-filter{ max-width:200px; } 8) repeat 5) and 6). Notice the columns no longer grow in width. Signed-off-by: Sally Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer (cherry picked from commit 99014e9395c1811e6c9c31cbb781d77f49f05cc8) Signed-off-by: Fridolin Somers --- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js index e03c0c2a3e..2da3d76bb7 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -837,7 +837,7 @@ function _dt_add_filters(table_node, table_dt, filters_options = {}) { input_type = 'select' let filter_type = $(this).data('filter'); let existing_search = table_dt.column(i).search(); - let select = $('