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 1
1
// Global settings and initializer
2
2
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
+
3
15
$ . extend ( $ . fn . dataTable . defaults , {
4
16
processing : true ,
5
17
serverSide : true ,
@@ -14,6 +26,7 @@ $.extend($.fn.dataTable.defaults, {
14
26
. buttons ( )
15
27
. container ( )
16
28
. appendTo ( $ ( '.col-md-6' , table . table ( ) . container ( ) ) . first ( ) ) ;
29
+ setupFooterSearch ( table ) ;
17
30
} ,
18
31
pagingType : 'full_numbers' ,
19
32
lengthChange : false ,
Original file line number Diff line number Diff line change 24
24
%th Dietary restrictions
25
25
%th Special needs
26
26
%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
+
27
59
28
60
.row
29
61
.col-sm-7.col-lg-6
Original file line number Diff line number Diff line change 11
11
%th State
12
12
%th Count
13
13
%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