|
|
@@ -2586,6 +2586,32 @@
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+ BootstrapTable.prototype.toggleAllColumns = function (visible) {
|
|
|
+ $.each(this.columns, function (i, column) {
|
|
|
+ this.columns[i].visible = visible;
|
|
|
+ });
|
|
|
+
|
|
|
+ this.initHeader();
|
|
|
+ this.initSearch();
|
|
|
+ this.initPagination();
|
|
|
+ this.initBody();
|
|
|
+ if (this.options.showColumns) {
|
|
|
+ var $items = this.$toolbar.find('.keep-open input').prop('disabled', false);
|
|
|
+
|
|
|
+ if ($items.filter(':checked').length <= this.options.minimumCountColumns) {
|
|
|
+ $items.filter(':checked').prop('disabled', true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ BootstrapTable.prototype.showAllColumns = function () {
|
|
|
+ this.toggleAllColumns(true);
|
|
|
+ };
|
|
|
+
|
|
|
+ BootstrapTable.prototype.hideAllColumns = function () {
|
|
|
+ this.toggleAllColumns(false);
|
|
|
+ };
|
|
|
+
|
|
|
BootstrapTable.prototype.filterBy = function (columns) {
|
|
|
this.filterColumns = $.isEmptyObject(columns) ? {} : columns;
|
|
|
this.options.pageNumber = 1;
|
|
|
@@ -2754,6 +2780,7 @@
|
|
|
'destroy',
|
|
|
'showLoading', 'hideLoading',
|
|
|
'showColumn', 'hideColumn', 'getHiddenColumns',
|
|
|
+ 'showAllColumns', 'hideAllColumns',
|
|
|
'filterBy',
|
|
|
'scrollTo',
|
|
|
'getScrollPosition',
|