File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
adminlteui/templates/admin Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 2424 {% endblock %}
2525 </ div >
2626 </ div >
27- < script > document . querySelector ( '.actions select' ) . setAttribute ( 'class' , 'form-control' ) </ script >
27+ < script >
28+ document . querySelector ( '.actions select' ) . setAttribute ( 'class' , 'form-control' ) ;
29+ document . querySelector ( '.actions select' ) . style . minWidth = '200px' ;
30+ </ script >
2831</ div >
Original file line number Diff line number Diff line change 11{% load i18n %}
22
33< div class ="form-group " style ="margin-bottom: 5px; ">
4- < select id ="id_filter_{{ field_name }} " class ="form-control search-filter " style ="width: 100%; " tabindex ="-1 " aria-hidden ="true ">
4+ < select id ="id_filter_{{ field_name }} " class ="form-control search-filter " style ="width: 100%; min-width: 200px; " tabindex ="-1 " aria-hidden ="true ">
55 < option value =""> {{ title }}</ option >
66 < option value =""> ---------</ option >
77 {% for choice in choices %}
1515 {% if spec.display_select2 %}
1616 < script >
1717 django . jQuery ( '#id_filter_{{ field_name }}' ) . select2 ( {
18- width : django . jQuery ( '#id_filter_{{ field_name }}' ) . width ( ) + 26
18+ dropdownAutoWidth : true ,
19+ width : '100%'
1920 } )
21+ django . jQuery ( '#id_filter_{{ field_name }}' ) . parent ( ) . find ( 'span.select2-container' ) . css ( { 'min-width' : '200px' } )
2022 django . jQuery ( '#id_filter_{{ field_name }}' ) . on ( 'select2:select' , function ( e ) {
2123 if ( e . params . data . id !== '' ) {
2224 django . jQuery ( '#id_filter_{{ field_name }}' ) . attr ( 'name' , e . params . data . element . dataset . name )
You can’t perform that action at this time.
0 commit comments