1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | ($ => {
|
8 | $.extend($.fn.bootstrapTable.defaults, {
|
9 | classes: 'ui selectable celled table',
|
10 | buttonsPrefix: '',
|
11 | buttonsClass: 'ui button'
|
12 | })
|
13 |
|
14 | $.BootstrapTable = class extends $.BootstrapTable {
|
15 | initConstants () {
|
16 | super.initConstants()
|
17 |
|
18 | this.constants.theme = 'semantic'
|
19 |
|
20 | this.constants.classes.buttonsGroup = 'ui buttons'
|
21 | this.constants.classes.buttonsDropdown = 'ui button dropdown'
|
22 | this.constants.classes.inputGroup = 'ui input'
|
23 | this.constants.classes.paginationDropdown = 'ui dropdown'
|
24 |
|
25 | this.constants.html.toobarDropdow = ['<div class="menu">', '</div>']
|
26 | this.constants.html.toobarDropdowItem = '<label class="item">%s</label>'
|
27 | this.constants.html.pageDropdown = ['<div class="menu">', '</div>']
|
28 | this.constants.html.pageDropdownItem = '<a class="item %s" href="#">%s</a>'
|
29 | this.constants.html.dropdownCaret = '<i class="dropdown icon"></i>'
|
30 | this.constants.html.pagination = ['<div class="ui pagination menu%s">', '</div>'],
|
31 | this.constants.html.paginationItem = '<a class="page-item item%s" href="#">%s</a>'
|
32 | }
|
33 |
|
34 | initToolbar () {
|
35 | super.initToolbar()
|
36 | if (this.options.showColumns) {
|
37 | this.$toolbar.find('.button.dropdown').dropdown()
|
38 | }
|
39 | }
|
40 |
|
41 | initPagination () {
|
42 | super.initPagination()
|
43 | if (this.options.pagination && !this.options.onlyInfoPagination) {
|
44 | this.$pagination.find('.dropdown').dropdown()
|
45 | }
|
46 | }
|
47 | }
|
48 | })(jQuery)
|