From 81d758c2d2d26064091ef863c11cbdec7f68bc7d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 18 Jun 2024 12:49:06 +0000 Subject: [PATCH] Bug 37050: (follow-up) CSS and configuration tweak This follow-up tweaks the Select2 CSS so that the selected choices don't display with 100% width. The patch also removes the "closeOnSelect: false" configuration from Select2. In discussing this option for Bug 36545 more people preferred the default behavior and I think we should be consistent. --- koha-tmpl/intranet-tmpl/prog/css/select2.css | 5 +++++ .../prog/en/modules/reports/guided_reports_start.tt | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/select2.css b/koha-tmpl/intranet-tmpl/prog/css/select2.css index 8046026ea5..89915eccd3 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/select2.css +++ b/koha-tmpl/intranet-tmpl/prog/css/select2.css @@ -44,3 +44,8 @@ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { margin-right: 3px; } + +.select2-container--default .select2-selection--multiple .select2-selection__rendered li { + clear: none; + width: auto; +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 72a304586e..ece2edb07e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -2320,9 +2320,7 @@ let selectFields = document.querySelectorAll('select[multiple]'); selectFields.forEach((selectField) => { selectField.style.minWidth = '320px'; - $(selectField).select2({ - closeOnSelect: false, - }); + $(selectField).select2(); }); }); -- 2.39.2