From c525e97fcbd6558cfa624f2327cebc744c4aa028 Mon Sep 17 00:00:00 2001 From: KONE SOREL Date: Thu, 26 Feb 2026 14:46:09 +0000 Subject: [PATCH] fas --- Bootstrap_new/css/theme-modern.css | 18 ++++++++++++++++++ Js/fonctions.js | 17 ++++++----------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/Bootstrap_new/css/theme-modern.css b/Bootstrap_new/css/theme-modern.css index 7434e6d1..a6da9176 100644 --- a/Bootstrap_new/css/theme-modern.css +++ b/Bootstrap_new/css/theme-modern.css @@ -1270,4 +1270,22 @@ select.selectpicker { border: 1px solid #ced4da !important; background-color: #fff !important; font-size: 0.8rem !important; +} + +/* Limite la largeur du menu déroulant quand il est attaché au body */ +body > .bootstrap-select.dropdown { + max-width: 400px !important; /* Ajustez selon vos besoins */ + width: auto !important; +} + +/* Assure que la boîte de recherche reste compacte */ +.bootstrap-select .dropdown-menu { + min-width: 100% !important; + max-width: 100% !important; + box-shadow: var(--shadow-lg); +} + +/* Fix pour l'affichage plein écran */ +.bootstrap-select.show { + width: 100% !important; } \ No newline at end of file diff --git a/Js/fonctions.js b/Js/fonctions.js index 26765742..06015720 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -91555,29 +91555,24 @@ function initSelectPicker() { * Gère la langue, évite les doublons et active la recherche */ function ui_refresh_select(selector) { - let $el = $(selector); + var $el = $(selector); if ($el.length === 0) return; - // Récupération de la langue (via un input hidden ou une variable globale) let codeLangue = $("#codeLangue").val(); let placeholder = (codeLangue === "en_US") ? 'Search...' : 'Rechercher...'; let noneText = (codeLangue === "en_US") ? 'Nothing selected' : 'Rien de sélectionné'; if (typeof $.fn.selectpicker !== 'undefined') { - // Nettoyage et réinitialisation $el.selectpicker('destroy').selectpicker({ style: 'btn-form-select', liveSearch: true, liveSearchPlaceholder: placeholder, noneSelectedText: noneText, - width: '100%', - container: 'body' // Recommandé pour éviter les problèmes de scroll - }); - } else if (typeof $.fn.select2 !== 'undefined') { - // Fallback Select2 - $el.select2({ - theme: 'bootstrap-5', - width: '100%' + width: '100%', // Assure que le bouton prend la largeur de la colonne + container: 'body', + dropdownAlignRight: 'auto', + // On force la taille du menu déroulant + size: 'auto' }); } } \ No newline at end of file