diff --git a/www/Themes/Centreon-2/style.css b/www/Themes/Centreon-2/style.css index ab410b586281e84ea8dbbc7d3c54c17968f3488b..46d8a7804032a64018ac9d6003662993653e3f24 100644 --- a/www/Themes/Centreon-2/style.css +++ b/www/Themes/Centreon-2/style.css @@ -207,13 +207,16 @@ p.description a, p.description a:visited { width: 213px !important; } +.select2-selection { + cursor: initial !important; +} + .select2-container .select2-selection--multiple { min-height: auto !important; } .select2-container .select2-search--inline .select2-search__field { margin-top: 0 !important; - width: 200px !important; } .select2-container--default .select2-selection--single { @@ -267,10 +270,17 @@ p.description a, p.description a:visited { background-color: #bfecff !important; } -.select2-container--default .select2-selection--multiple .select2-selection__rendered { +.formTable .select2-container--default .select2-selection--multiple .select2-selection__rendered { + min-height: 28px; +} + +.ajaxOption .select2-container--default .select2-selection--multiple .select2-selection__rendered { max-height: 80px; } +.formTable .select2-container--default .select2-selection--multiple .select2-selection__rendered { + min-height: 28px; +} /* Selected elements */ .select2-results-header { diff --git a/www/include/common/javascript/centreon/centreon-select2.js b/www/include/common/javascript/centreon/centreon-select2.js index 665a51356eb7f295093a1d2c8006d91cdae15b31..da9e1947e3988913fd8ef17578562a0e181e8436 100644 --- a/www/include/common/javascript/centreon/centreon-select2.js +++ b/www/include/common/javascript/centreon/centreon-select2.js @@ -84,6 +84,18 @@ if (this.settings.multiple) { this.initMultiple(); } + + this.resizeSelect2(); + }, + + resizeSelect2: function() { + var formSpan = jQuery(".formTable span.select2-container"); + formSpan.css({ + 'min-width': '360px', + }); + formSpan.find('.select2-selection--multiple .select2-selection__rendered').css({ + 'resize': 'vertical' + }); }, /** * Load the locale, if not defined in settings use the browser locale diff --git a/www/include/common/javascript/centreon/multiselectResizer.js b/www/include/common/javascript/centreon/multiselectResizer.js index 74845178c79f39512d548c86b4e386b58521aded..0c67af844765d7e6012474fac4792c30d1712ba2 100644 --- a/www/include/common/javascript/centreon/multiselectResizer.js +++ b/www/include/common/javascript/centreon/multiselectResizer.js @@ -40,7 +40,7 @@ */ jQuery(function() { // minimum width of the selectbox, change it if you want - var minAllowedWidth = 270; + var minAllowedWidth = 360; // maximum width of the selectbox, twice larger than minimum width var maxAllowedWidth = (minAllowedWidth * 2);