corrade-nucleus-nucleons – Blame information for rev 20

Subversion Repositories:
Rev:
Rev Author Line No. Line
20 office 1 # Events []({{ site.repo }}/blob/develop/docs/_i18n/{{ site.lang }}/documentation/events.md)
2  
3 ---
4  
5 To use event syntax:
6  
7 ```js
8 $('#table').bootstrapTable({
9 onEventName: function (arg1, arg2, ...) {
10 // ...
11 }
12 });
13  
14 $('#table').on('event-name.bs.table', function (e, arg1, arg2, ...) {
15 // ...
16 });
17 ```
18  
19 <table class="table"
20 id="e"
21 data-search="true"
22 data-show-toggle="true"
23 data-show-columns="true"
24 data-mobile-responsive="true">
25 <thead>
26 <tr>
27 <th>Option Event</th>
28 <th>jQuery Event</th>
29 <th>Parameter</th>
30 <th>Description</th>
31 </tr>
32 </thead>
33 <tbody>
34 <tr>
35 <td>onAll</td>
36 <td>all.bs.table</td>
37 <td>name, args</td>
38 <td>
39 Fires when all events trigger, the parameters contain: <br>
40 name: the event name, <br>
41 args: the event data.
42 </td>
43 </tr>
44 <tr>
45 <td>onClickRow</td>
46 <td>click-row.bs.table</td>
47 <td>row, $element, field</td>
48 <td>
49 Fires when user click a row, the parameters contain: <br>
50 row: the record corresponding to the clicked row, <br>
51 $element: the tr element, <br>
52 field: the field name corresponding to the clicked cell.
53 </td>
54 </tr>
55 <tr>
56 <td>onDblClickRow</td>
57 <td>dbl-click-row.bs.table</td>
58 <td>row, $element, field</td>
59 <td>
60 Fires when user double click a row, the parameters contain: <br>
61 row: the record corresponding to the clicked row, <br>
62 $element: the tr element, <br>
63 field: the field name corresponding to the clicked cell.
64 </td>
65 </tr>
66 <tr>
67 <td>onClickCell</td>
68 <td>click-cell.bs.table</td>
69 <td>field, value, row, $element</td>
70 <td>
71 Fires when user click a cell, the parameters contain: <br>
72 field: the field name corresponding to the clicked cell, <br>
73 value: the data value corresponding to the clicked cell, <br>
74 row: the record corresponding to the clicked row, <br>
75 $element: the td element.
76 </td>
77 </tr>
78 <tr>
79 <td>onDblClickCell</td>
80 <td>dbl-click-cell.bs.table</td>
81 <td>field, value, row, $element</td>
82 <td>
83 Fires when user double click a cell, the parameters contain: <br>
84 field: the field name corresponding to the clicked cell, <br>
85 value: the data value corresponding to the clicked cell, <br>
86 row: the record corresponding to the clicked row, <br>
87 $element: the td element.
88 </td>
89 </tr>
90 <tr>
91 <td>onSort</td>
92 <td>sort.bs.table</td>
93 <td>name, order</td>
94 <td>
95 Fires when user sort a column, the parameters contain: <br>
96 name: the sort column field name<br>
97 order: the sort column order.
98 </td>
99 </tr>
100 <tr>
101 <td>onCheck</td>
102 <td>check.bs.table</td>
103 <td>row, $element</td>
104 <td>
105 Fires when user check a row, the parameters contain: <br>
106 row: the record corresponding to the clicked row.
107 $element: the DOM element checked.
108 </td>
109 </tr>
110 <tr>
111 <td>onUncheck</td>
112 <td>uncheck.bs.table</td>
113 <td>row, $element</td>
114 <td>
115 Fires when user uncheck a row, the parameters contain: <br>
116 row: the record corresponding to the clicked row.
117 $element: the DOM element unchecked.
118 </td>
119 </tr>
120 <tr>
121 <td>onCheckAll</td>
122 <td>check-all.bs.table</td>
123 <td>rows</td>
124 <td>
125 Fires when user check all rows, the parameters contain: <br>
126 rows: array of records corresponding to newly checked rows.
127 </td>
128 </tr>
129 <tr>
130 <td>onUncheckAll</td>
131 <td>uncheck-all.bs.table</td>
132 <td>rows</td>
133 <td>
134 Fires when user uncheck all rows, the parameters contain: <br>
135 rows: array of records corresponding to previously checked rows.
136 </td>
137 </tr>
138 <tr>
139 <td>onCheckSome</td>
140 <td>check-some.bs.table</td>
141 <td>rows</td>
142 <td>
143 Fires when user check some rows, the parameters contain: <br>
144 rows: array of records corresponding to previously checked rows.
145 </td>
146 </tr>
147 <tr>
148 <td>onUncheckSome</td>
149 <td>uncheck-some.bs.table</td>
150 <td>rows</td>
151 <td>
152 Fires when user uncheck some rows, the parameters contain: <br>
153 rows: array of records corresponding to previously checked rows.
154 </td>
155 </tr>
156 <tr>
157 <td>onLoadSuccess</td>
158 <td>load-success.bs.table</td>
159 <td>data</td>
160 <td>Fires when remote data is loaded
161 successfully.
162 </td>
163 </tr>
164 <tr>
165 <td>onLoadError</td>
166 <td>load-error.bs.table</td>
167 <td>status, res</td>
168 <td>Fires when some errors occur to load remote data.</td>
169 </tr>
170 <tr>
171 <td>onColumnSwitch</td>
172 <td>column-switch.bs.table</td>
173 <td>field, checked</td>
174 <td>Fires when switch the column visible.</td>
175 </tr>
176 <tr>
177 <td>onColumnSearch</td>
178 <td>column-search.bs.table</td>
179 <td>field, text</td>
180 <td>Fires when search by column.</td>
181 </tr>
182 <tr>
183 <td>onPageChange</td>
184 <td>page-change.bs.table</td>
185 <td>number, size</td>
186 <td>Fires when change the page number or page size.</td>
187 </tr>
188 <tr>
189 <td>onSearch</td>
190 <td>search.bs.table</td>
191 <td>text</td>
192 <td>Fires when search the table.</td>
193 </tr>
194 <tr>
195 <td>onToggle</td>
196 <td>toggle.bs.table</td>
197 <td>cardView</td>
198 <td>Fires when toggle the view of table.</td>
199 </tr>
200 <tr>
201 <td>onPreBody</td>
202 <td>pre-body.bs.table</td>
203 <td>data</td>
204 <td>Fires before the table body is rendered</td>
205 </tr>
206 <tr>
207 <td>onPostBody</td>
208 <td>post-body.bs.table</td>
209 <td>data</td>
210 <td>Fires after the table body is rendered and available in the DOM</td>
211 </tr>
212 <tr>
213 <td>onPostHeader</td>
214 <td>post-header.bs.table</td>
215 <td>none</td>
216 <td>Fires after the table header is rendered and availble in the DOM</td>
217 </tr>
218 <tr>
219 <td>onExpandRow</td>
220 <td>expand-row.bs.table</td>
221 <td>index, row, $detail</td>
222 <td>Fires when click the detail icon to expand the detail view.</td>
223 </tr>
224 <tr>
225 <td>onCollapseRow</td>
226 <td>collapse-row.bs.table</td>
227 <td>index, row</td>
228 <td>Fires when click the detail icon to collapse the detail view.</td>
229 </tr>
230 <tr>
231 <td>onRefreshOptions</td>
232 <td>refresh-options.bs.table</td>
233 <td>options</td>
234 <td>Fires after refresh the options and before destroy and init the table</td>
235 </tr>
236 <tr>
237 <td>onResetView</td>
238 <td>reset-view.bs.table</td>
239 <td></td>
240 <td>Fires when reset view of the table.</td>
241 </tr>
242 <tr>
243 <td>onRefresh</td>
244 <td>refresh.bs.table</td>
245 <td>params</td>
246 <td>Fires after the click the refresh button.</td>
247 </tr>
248 </tbody>
249 </table>