|
|
@@ -261,10 +261,16 @@
|
|
|
onUncheck: function (row) {
|
|
|
return false;
|
|
|
},
|
|
|
- onCheckAll: function () {
|
|
|
+ onCheckAll: function (rows) {
|
|
|
return false;
|
|
|
},
|
|
|
- onUncheckAll: function () {
|
|
|
+ onUncheckAll: function (rows) {
|
|
|
+ return false;
|
|
|
+ },
|
|
|
+ onCheckSome: function(rows){
|
|
|
+ return false;
|
|
|
+ },
|
|
|
+ onUncheckSome: function(rows){
|
|
|
return false;
|
|
|
},
|
|
|
onLoadSuccess: function (data) {
|
|
|
@@ -375,6 +381,8 @@
|
|
|
'uncheck.bs.table': 'onUncheck',
|
|
|
'check-all.bs.table': 'onCheckAll',
|
|
|
'uncheck-all.bs.table': 'onUncheckAll',
|
|
|
+ 'check-some.bs.table': 'onCheckSome',
|
|
|
+ 'uncheck-some.bs.table': 'onUncheckSome',
|
|
|
'load-success.bs.table': 'onLoadSuccess',
|
|
|
'load-error.bs.table': 'onLoadError',
|
|
|
'column-switch.bs.table': 'onColumnSwitch',
|
|
|
@@ -1984,6 +1992,15 @@
|
|
|
$td.attr('rowspan', rowspan).attr('colspan', colspan).show();
|
|
|
};
|
|
|
|
|
|
+ BootstrapTable.prototype.updateCell = function (params) {
|
|
|
+ if (!params.hasOwnProperty('rowIndex') || !params.hasOwnProperty('fieldName') || !params.hasOwnProperty('fieldValue')) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.data[params.rowIndex][params.fieldName] = params.fieldValue;
|
|
|
+ this.initSort();
|
|
|
+ this.initBody(true);
|
|
|
+ };
|
|
|
+
|
|
|
BootstrapTable.prototype.getOptions = function () {
|
|
|
return this.options;
|
|
|
};
|
|
|
@@ -2054,7 +2071,8 @@
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- var that = this;
|
|
|
+ var that = this,
|
|
|
+ rows = [];
|
|
|
$.each(this.options.data, function (index, row) {
|
|
|
if (!row.hasOwnProperty(obj.field)) {
|
|
|
return false;
|
|
|
@@ -2062,10 +2080,12 @@
|
|
|
if ($.inArray(row[obj.field], obj.values) !== -1) {
|
|
|
that.$selectItem.filter(sprintf('[data-index="%s"]', index)).prop('checked', checked);
|
|
|
row[that.header.stateField] = checked;
|
|
|
+ rows.push(row);
|
|
|
that.trigger(checked ? 'check' : 'uncheck', row);
|
|
|
}
|
|
|
});
|
|
|
this.updateSelected();
|
|
|
+ this.trigger(checked ? 'check-some' : 'uncheck-some', rows);
|
|
|
};
|
|
|
|
|
|
BootstrapTable.prototype.destroy = function () {
|