File tree 1 file changed +6
-4
lines changed 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 73
73
74
74
$ . BootstrapTable = class extends $ . BootstrapTable {
75
75
initToolbar ( ) {
76
+ const o = this . options
77
+
78
+ this . showToolbar = this . showToolbar || o . search && o . advancedSearch && o . idTable
79
+
76
80
super . initToolbar ( )
77
81
78
- const o = this . options
79
82
if ( ! o . search || ! o . advancedSearch || ! o . idTable ) {
80
83
return
81
84
}
82
85
83
- this . $toolbar . prepend ( `
84
- <div class="columns columns-${ o . buttonsAlign } btn-group pull-${ o . buttonsAlign } " role="group">
86
+ this . $toolbar . find ( '>.btn-group' ) . append ( `
85
87
<button class="btn btn-default${ Utils . sprintf ( ' btn-%s' , o . buttonsClass ) } ${ Utils . sprintf ( ' btn-%s' , o . iconSize ) } "
86
88
type="button"
87
89
name="advancedSearch"
88
90
aria-label="advanced search"
89
91
title="${ o . formatAdvancedSearch ( ) } ">
90
92
<i class="${ o . iconsPrefix } ${ o . icons . advancedSearchIcon } "></i>
91
- </button></div>
93
+ </button>
92
94
` )
93
95
94
96
this . $toolbar . find ( 'button[name="advancedSearch"]' ) . off ( 'click' ) . on ( 'click' , ( ) => this . showAvdSearch ( ) )
You can’t perform that action at this time.
0 commit comments