|
|
@@ -1499,6 +1499,14 @@
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+ BootstrapTable.prototype.toggleRow = function (index, visible) {
|
|
|
+ if (index === -1) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$selectItem.filter(sprintf('[data-index="%s"]', index)).parents('tr')[visible ? 'show' : 'hide']();
|
|
|
+ };
|
|
|
|
|
|
// PUBLIC FUNCTION DEFINITION
|
|
|
// =======================
|
|
|
@@ -1627,6 +1635,14 @@
|
|
|
$.extend(this.data[params.index], params.row);
|
|
|
this.initBody(true);
|
|
|
};
|
|
|
+
|
|
|
+ BootstrapTable.prototype.showRow = function (index) {
|
|
|
+ this.toggleRow(index, true);
|
|
|
+ };
|
|
|
+
|
|
|
+ BootstrapTable.prototype.hideRow = function (index) {
|
|
|
+ this.toggleRow(index, false);
|
|
|
+ };
|
|
|
|
|
|
BootstrapTable.prototype.mergeCells = function (options) {
|
|
|
var row = options.index,
|
|
|
@@ -1770,7 +1786,7 @@
|
|
|
BootstrapTable.prototype.hideColumn = function (field) {
|
|
|
this.toggleColumn(getFieldIndex(this.options.columns, field), false, true);
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
BootstrapTable.prototype.filterBy = function (columns) {
|
|
|
this.filterColumns = $.isEmptyObject(columns) ? {} : columns;
|
|
|
this.options.pageNumber = 1;
|
|
|
@@ -1814,7 +1830,7 @@
|
|
|
this.initHeader();
|
|
|
this.initBody();
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
// BOOTSTRAP TABLE PLUGIN DEFINITION
|
|
|
// =======================
|
|
|
|
|
|
@@ -1822,7 +1838,7 @@
|
|
|
'getOptions',
|
|
|
'getSelections', 'getData',
|
|
|
'load', 'append', 'prepend', 'remove',
|
|
|
- 'insertRow', 'updateRow',
|
|
|
+ 'insertRow', 'updateRow', 'showRow', 'hideRow',
|
|
|
'mergeCells',
|
|
|
'checkAll', 'uncheckAll',
|
|
|
'check', 'uncheck',
|