File tree Expand file tree Collapse file tree 3 files changed +55
-0
lines changed
assets/javascripts/manage/lib Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 11// Global settings and initializer
22
3+ function setupFooterSearch ( table ) {
4+ table . columns ( ) . every ( function ( ) {
5+ var column = this ;
6+ $ ( ':input' , column . footer ( ) ) . on ( 'keyup change' , function ( ) {
7+ var input = this ;
8+ if ( column . search ( ) !== input . value ) {
9+ column . search ( input . value ) . draw ( ) ;
10+ }
11+ } ) ;
12+ } ) ;
13+ }
14+
315$ . extend ( $ . fn . dataTable . defaults , {
416 processing : true ,
517 serverSide : true ,
@@ -14,6 +26,7 @@ $.extend($.fn.dataTable.defaults, {
1426 . buttons ( )
1527 . container ( )
1628 . appendTo ( $ ( '.col-md-6' , table . table ( ) . container ( ) ) . first ( ) ) ;
29+ setupFooterSearch ( table ) ;
1730 } ,
1831 pagingType : 'full_numbers' ,
1932 lengthChange : false ,
Original file line number Diff line number Diff line change 2424 %th Dietary restrictions
2525 %th Special needs
2626 %tbody
27+ %tfoot
28+ %tr
29+ %th
30+ %th
31+ %th
32+ %th
33+ %input.form-control.form-control-sm{autocomplete: 'off', placeholder: 'ID'}
34+ %th
35+ %input.form-control.form-control-sm{autocomplete: 'off', placeholder: 'First name'}
36+ %th
37+ %input.form-control.form-control-sm{autocomplete: 'off', placeholder: 'Last name'}
38+ %th
39+ %input.form-control.form-control-sm{autocomplete: 'off', placeholder: 'Email'}
40+ %th
41+ %input.form-control.form-control-sm{autocomplete: 'off', placeholder: 'Phone'}
42+ %th
43+ %input.form-control.form-control-sm{autocomplete: 'off', placeholder: 'Gender'}
44+ %th
45+ %th
46+ %select.form-control.form-control-sm
47+ %option{value: ''} Status
48+ - Questionnaire::POSSIBLE_ACC_STATUS.each do |key, value|
49+ %option{value: key}= value
50+ %th
51+ %th
52+ %input.form-control.form-control-sm{autocomplete: 'off', placeholder: 'School'}
53+ %th
54+ %th
55+ %input.form-control.form-control-sm{autocomplete: 'off', placeholder: 'Dietary restrictions'}
56+ %th
57+ %input.form-control.form-control-sm{autocomplete: 'off', placeholder: 'Special needs'}
58+
2759
2860 .row
2961 .col-sm-7.col-lg-6
Original file line number Diff line number Diff line change 1111 %th State
1212 %th Count
1313 %tbody
14+ %tfoot
15+ %tr
16+ %th
17+ %input.form-control.form-control-sm{autocomplete: 'off', placeholder: 'ID'}
18+ %th
19+ %input.form-control.form-control-sm{autocomplete: 'off', placeholder: 'Name'}
20+ %th
21+ %input.form-control.form-control-sm{autocomplete: 'off', placeholder: 'City'}
22+ %th
23+ %input.form-control.form-control-sm{autocomplete: 'off', placeholder: 'State'}
You can’t perform that action at this time.
0 commit comments