1{# Copyright 2014-2018 Siemens AG 2 3 Copying and distribution of this file, with or without modification, 4 are permitted in any medium without royalty provided the copyright notice and this notice are preserved. 5 This file is offered as-is, without any warranty. 6#} 7<script src="scripts/jquery-3.6.0.min.js" type="text/javascript"></script> 8<script src="scripts/jquery-ui.js" type="text/javascript"></script> 9<script src="scripts/select2.full.min.js" type="text/javascript"></script> 10<script type="text/javascript"> 11 function renderSelect2() { 12 if(!$('.ui-render-select2').attr("size") > 0) { 13 $('.ui-render-select2').each(function() { 14 var dropdownParent = $(document.body); 15 if ($(this).parents('.modal').length !== 0) { 16 dropdownParent = $(this).parents('.modal'); 17 } 18 $(this).select2({ 19 width: 'style', 20 dropdownAutoWidth : true, 21 dropdownParent: dropdownParent 22 }); 23 }); 24 } 25 } 26 $(document).ready(function() { 27 renderSelect2(); 28 }); 29</script> 30{{ scripts }} 31