Bugzilla – Attachment 160228 Details for
Bug 34574
Datatables column dropdown select filter does not have a CSS class
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34574: Limit datatables dropdown columns to a max of 200px
Bug-34574-Limit-datatables-dropdown-columns-to-a-m.patch (text/plain), 1.95 KB, created by
Biblibre Sandboxes
on 2023-12-22 09:45:01 UTC
(
hide
)
Description:
Bug 34574: Limit datatables dropdown columns to a max of 200px
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2023-12-22 09:45:01 UTC
Size:
1.95 KB
patch
obsolete
>From e2751e2d59b6edcb4976886d01d0a6dda1db76c9 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 21 Dec 2023 14:11:35 +0000 >Subject: [PATCH] Bug 34574: Limit datatables dropdown columns to a max of > 200px > >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, repeat 5) and 6). Notice the columns no longer grow in width. > >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> >--- > 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 d7a313a9e8..a736a695de 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 = $('<select><option value=""></option></select'); >+ let select = $('<select style="max-width:200px"><option value=""></option></select'); > > // FIXME eval here is bad and dangerous, how do we workaround that? > if ( !filters_options.hasOwnProperty(i) ) { >-- >2.30.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 34574
:
160193
|
160228
|
161444
|
161445
|
162602