|
9 | 9 | ($ => {
|
10 | 10 | const Utils = $.fn.bootstrapTable.utils
|
11 | 11 |
|
| 12 | + const bootstrap = { |
| 13 | + 3: { |
| 14 | + icons: { |
| 15 | + advancedSearchIcon: 'glyphicon-chevron-down' |
| 16 | + }, |
| 17 | + html: { |
| 18 | + modalHeader: ` |
| 19 | + <div class="modal-header"> |
| 20 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| 21 | + <span aria-hidden="true">×</span> |
| 22 | + </button> |
| 23 | + <h4 class="modal-title">%s</h4> |
| 24 | + </div> |
| 25 | + ` |
| 26 | + } |
| 27 | + }, |
| 28 | + 4: { |
| 29 | + icons: { |
| 30 | + advancedSearchIcon: 'fa-chevron-down' |
| 31 | + }, |
| 32 | + html: { |
| 33 | + modalHeader: ` |
| 34 | + <div class="modal-header"> |
| 35 | + <h4 class="modal-title">%s</h4> |
| 36 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| 37 | + <span aria-hidden="true">×</span> |
| 38 | + </button> |
| 39 | + </div> |
| 40 | + ` |
| 41 | + } |
| 42 | + } |
| 43 | + }[Utils.bootstrapVersion] |
| 44 | + |
12 | 45 | $.extend($.fn.bootstrapTable.defaults, {
|
13 | 46 | advancedSearch: false,
|
14 | 47 | idForm: 'advancedSearch',
|
|
20 | 53 | })
|
21 | 54 |
|
22 | 55 | $.extend($.fn.bootstrapTable.defaults.icons, {
|
23 |
| - advancedSearchIcon: 'glyphicon-chevron-down' |
| 56 | + advancedSearchIcon: bootstrap.icons.advancedSearchIcon |
24 | 57 | })
|
25 | 58 |
|
26 | 59 | $.extend($.fn.bootstrapTable.Constructor.EVENTS, {
|
|
69 | 102 | <div id="avdSearchModal_${o.idTable}" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
|
70 | 103 | <div class="modal-dialog modal-xs">
|
71 | 104 | <div class="modal-content">
|
72 |
| - <div class="modal-header"> |
73 |
| - <button type="button" class="close" data-dismiss="modal" aria-hidden="true" >×</button> |
74 |
| - <h4 class="modal-title">${o.formatAdvancedSearch()}</h4> |
75 |
| - </div> |
| 105 | + ${Utils.sprintf(bootstrap.html.modalHeader, o.formatAdvancedSearch())} |
76 | 106 | <div class="modal-body modal-body-custom">
|
77 |
| - <div class="container-fluid" id="avdSearchModalContent_${o.idTable}" style="padding-right: 0px; padding-left: 0px;" > |
| 107 | + <div class="container-fluid" id="avdSearchModalContent_${o.idTable}" |
| 108 | + style="padding-right: 0px; padding-left: 0px;" > |
78 | 109 | </div>
|
79 | 110 | </div>
|
| 111 | + <div class="modal-footer"> |
| 112 | + <button type="button" id="btnCloseAvd_${o.idTable}" class="btn btn-${o.buttonsClass}"> |
| 113 | + ${o.formatAdvancedCloseButton()} |
| 114 | + </button> |
| 115 | + </div> |
80 | 116 | </div>
|
81 | 117 | </div>
|
82 | 118 | </div>
|
|
110 | 146 | for (let column of this.columns) {
|
111 | 147 | if (!column.checkbox && column.visible && column.searchable) {
|
112 | 148 | html.push(`
|
113 |
| - <div class="form-group"> |
| 149 | + <div class="form-group row"> |
114 | 150 | <label class="col-sm-4 control-label">${column.title}</label>
|
115 | 151 | <div class="col-sm-6">
|
116 | 152 | <input type="text" class="form-control input-md" name="${column.field}" placeholder="${column.title}" id="${column.field}">
|
|
120 | 156 | }
|
121 | 157 | }
|
122 | 158 |
|
123 |
| - html.push(` |
124 |
| - <div class="form-group"> |
125 |
| - <div class="col-sm-offset-9 col-sm-3"> |
126 |
| - <button type="button" id="btnCloseAvd_${o.idTable}" class="btn btn-default">${o.formatAdvancedCloseButton()}</button> |
127 |
| - </div> |
128 |
| - </div> |
129 |
| - `) |
130 | 159 | html.push('</form>')
|
131 | 160 |
|
132 | 161 | return html
|
|
0 commit comments