diff --git a/src/extensions/export/bootstrap-table-export.js b/src/extensions/export/bootstrap-table-export.js index 850fe4bbb7..fae4a7d847 100644 --- a/src/extensions/export/bootstrap-table-export.js +++ b/src/extensions/export/bootstrap-table-export.js @@ -44,7 +44,7 @@ _initToolbar = BootstrapTable.prototype.initToolbar; BootstrapTable.prototype.initToolbar = function () { - this.showToolbar = this.options.showExport; + this.showToolbar = this.showToolbar || this.options.showExport; _initToolbar.apply(this, Array.prototype.slice.apply(arguments)); @@ -93,7 +93,7 @@ $menu.find('li').click(function () { var type = $(this).data('type'), doExport = function () { - + if (!!that.options.exportFooter) { var data = that.getData(); var $footerRow = that.$tableFooter.find("tr").first(); @@ -102,7 +102,7 @@ var footerHtml = []; $.each($footerRow.children(), function (index, footerCell) { - + var footerCellHtml = $(footerCell).children(".th-inner").first().html(); footerData[that.columns[index].field] = footerCellHtml == ' ' ? null : footerCellHtml; @@ -119,12 +119,12 @@ $(lastTableRowCell).html(footerHtml[index]); }); } - + that.$el.tableExport($.extend({}, that.options.exportOptions, { type: type, escape: false })); - + if (!!that.options.exportFooter) { that.load(data); } diff --git a/src/extensions/filter-control/bootstrap-table-filter-control.js b/src/extensions/filter-control/bootstrap-table-filter-control.js index 6ef5abff3e..fe923ea8a1 100644 --- a/src/extensions/filter-control/bootstrap-table-filter-control.js +++ b/src/extensions/filter-control/bootstrap-table-filter-control.js @@ -42,7 +42,7 @@ var sortSelectControl = function (selectControl) { selectControl = $(selectControl.get(selectControl.length - 1)); var $opts = selectControl.find('option:gt(0)'); - + $opts.sort(function (a, b) { a = $(a).text().toLowerCase(); b = $(b).text().toLowerCase(); @@ -334,7 +334,7 @@ if ($.inArray(event.keyCode, [37, 38, 39, 40]) > -1) { return; } - + clearTimeout(event.currentTarget.timeoutId || 0); event.currentTarget.timeoutId = setTimeout(function () { that.onColumnSearch(event); @@ -535,7 +535,7 @@ }; BootstrapTable.prototype.initToolbar = function () { - this.showToolbar = this.options.filterControl && this.options.filterShowClear; + this.showToolbar = this.showToolbar || this.options.filterControl && this.options.filterShowClear; _initToolbar.apply(this, Array.prototype.slice.apply(arguments)); diff --git a/src/extensions/multiple-sort/bootstrap-table-multiple-sort.js b/src/extensions/multiple-sort/bootstrap-table-multiple-sort.js index 7f8556aa0f..13493f87e9 100644 --- a/src/extensions/multiple-sort/bootstrap-table-multiple-sort.js +++ b/src/extensions/multiple-sort/bootstrap-table-multiple-sort.js @@ -229,7 +229,7 @@ _initToolbar = BootstrapTable.prototype.initToolbar; BootstrapTable.prototype.initToolbar = function() { - this.showToolbar = true; + this.showToolbar = this.showToolbar || this.options.showMultiSort; var that = this, sortModalSelector = 'sortModal_' + this.$el.attr('id'), sortModalId = '#' + sortModalSelector; @@ -237,7 +237,7 @@ this.sortModalSelector = sortModalSelector; _initToolbar.apply(this, Array.prototype.slice.apply(arguments)); - + if (that.options.sidePagination === 'server' && !isSingleSort && that.options.sortPriority !== null){ var t = that.options.queryParams; that.options.queryParams = function(params) { diff --git a/src/extensions/page-jumpto/bootstrap-table-jumpto.js b/src/extensions/page-jumpto/bootstrap-table-jumpto.js index bc9d5e36a3..f09d5cd324 100644 --- a/src/extensions/page-jumpto/bootstrap-table-jumpto.js +++ b/src/extensions/page-jumpto/bootstrap-table-jumpto.js @@ -22,8 +22,6 @@ _initPagination = BootstrapTable.prototype.initPagination; BootstrapTable.prototype.initPagination = function () { - this.showToolbar = this.options.showExport; - _initPagination.apply(this, Array.prototype.slice.apply(arguments)); if (this.options.showJumpto) { diff --git a/src/extensions/print/bootstrap-table-print.js b/src/extensions/print/bootstrap-table-print.js index 6ae890522b..97a03f4989 100644 --- a/src/extensions/print/bootstrap-table-print.js +++ b/src/extensions/print/bootstrap-table-print.js @@ -43,7 +43,7 @@ _initToolbar = BootstrapTable.prototype.initToolbar; BootstrapTable.prototype.initToolbar = function () { - this.showToolbar = this.options.showPrint; + this.showToolbar = this.showToolbar || this.options.showPrint; _initToolbar.apply(this, Array.prototype.slice.apply(arguments)); @@ -68,7 +68,7 @@ return value || "-"; } } - + function buildTable(data,columns) { var out = "