diff --git a/front/css/app.css b/front/css/app.css index 7fdeddda..730fa63e 100755 --- a/front/css/app.css +++ b/front/css/app.css @@ -1094,7 +1094,11 @@ input[readonly] { width: 100% !important; } - +#settingsPage .select2-container .selection +{ + width: 100% !important; + display: inline-grid; +} /* ----------------------------------------------------------------- */ /* Devices page */ diff --git a/front/js/settings_utils.js b/front/js/settings_utils.js index 8df18f52..cc832160 100755 --- a/front/js/settings_utils.js +++ b/front/js/settings_utils.js @@ -304,6 +304,54 @@ function removeAllOptions(element) { $(`#${$(element).attr("my-input-to")}`).empty(); } +// ------------------------------------------------------------------- +// Add all options +function selectAll(element) { + settingsChanged(); + + // Get the element with the class 'deviceSelector' + // var selectElement = $('.deviceSelector select'); + var selectElement = $(`#${$(element).attr("my-input-to")}`); + + // Iterate over each option within the select element + selectElement.find('option').each(function() { + // Unselect each option + $(this).prop('selected', false); + }); + + // Trigger the 'change' event to notify Bootstrap Select of the changes + selectElement.trigger('change'); +} + +// ----------------------------------------------------------------------------- +// Trigger change to open up the dropdown filed +function selectChange(element) { + settingsChanged(); + // Get the