|
@@ -7,8 +7,7 @@ const Utils = $.fn.bootstrapTable.utils
|
|
|
|
|
|
|
|
$.extend($.fn.bootstrapTable.defaults, {
|
|
$.extend($.fn.bootstrapTable.defaults, {
|
|
|
customView: false,
|
|
customView: false,
|
|
|
- showCustomView: false,
|
|
|
|
|
- showCustomViewButton: false
|
|
|
|
|
|
|
+ customViewDefaultView: false
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
$.extend($.fn.bootstrapTable.defaults.icons, {
|
|
$.extend($.fn.bootstrapTable.defaults.icons, {
|
|
@@ -49,13 +48,13 @@ $.extend($.fn.bootstrapTable.Constructor.EVENTS, {
|
|
|
$.BootstrapTable = class extends $.BootstrapTable {
|
|
$.BootstrapTable = class extends $.BootstrapTable {
|
|
|
|
|
|
|
|
init () {
|
|
init () {
|
|
|
- this.showCustomView = this.options.showCustomView
|
|
|
|
|
|
|
+ this.customViewDefaultView = this.options.customViewDefaultView
|
|
|
|
|
|
|
|
super.init()
|
|
super.init()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
initToolbar (...args) {
|
|
initToolbar (...args) {
|
|
|
- if (this.options.customView && this.options.showCustomViewButton) {
|
|
|
|
|
|
|
+ if (this.options.customView) {
|
|
|
this.buttons = Object.assign(this.buttons, {
|
|
this.buttons = Object.assign(this.buttons, {
|
|
|
customView: {
|
|
customView: {
|
|
|
text: this.options.formatToggleCustomView(),
|
|
text: this.options.formatToggleCustomView(),
|
|
@@ -84,7 +83,7 @@ $.BootstrapTable = class extends $.BootstrapTable {
|
|
|
|
|
|
|
|
$table.hide()
|
|
$table.hide()
|
|
|
$customViewContainer.hide()
|
|
$customViewContainer.hide()
|
|
|
- if (!this.options.customView || !this.showCustomView) {
|
|
|
|
|
|
|
+ if (!this.options.customView || !this.customViewDefaultView) {
|
|
|
$table.show()
|
|
$table.show()
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
@@ -103,7 +102,7 @@ $.BootstrapTable = class extends $.BootstrapTable {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
toggleCustomView () {
|
|
toggleCustomView () {
|
|
|
- this.showCustomView = !this.showCustomView
|
|
|
|
|
|
|
+ this.customViewDefaultView = !this.customViewDefaultView
|
|
|
this.initBody()
|
|
this.initBody()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|