|
@@ -441,6 +441,7 @@
|
|
|
return sprintf('<input type="text" class="form-control date-filter-control bootstrap-table-filter-control-%s" style="width: 100%; visibility: %s">', field, isVisible);
|
|
return sprintf('<input type="text" class="form-control date-filter-control bootstrap-table-filter-control-%s" style="width: 100%; visibility: %s">', field, isVisible);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ disableControlWhenSearch: false,
|
|
|
//internal variables
|
|
//internal variables
|
|
|
valuesFilterControl: []
|
|
valuesFilterControl: []
|
|
|
});
|
|
});
|
|
@@ -514,6 +515,10 @@
|
|
|
}
|
|
}
|
|
|
}).on('column-switch.bs.table', function() {
|
|
}).on('column-switch.bs.table', function() {
|
|
|
setValues(that);
|
|
setValues(that);
|
|
|
|
|
+ }).on('load-success.bs.table', function() {
|
|
|
|
|
+ that.EnableControls(true);
|
|
|
|
|
+ }).on('load-error.bs.table', function() {
|
|
|
|
|
+ that.EnableControls(true);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
_init.apply(this, Array.prototype.slice.apply(arguments));
|
|
_init.apply(this, Array.prototype.slice.apply(arguments));
|
|
@@ -643,6 +648,7 @@
|
|
|
this.searchText += "randomText";
|
|
this.searchText += "randomText";
|
|
|
|
|
|
|
|
this.options.pageNumber = 1;
|
|
this.options.pageNumber = 1;
|
|
|
|
|
+ this.EnableControls(false);
|
|
|
this.onSearch(event);
|
|
this.onSearch(event);
|
|
|
this.trigger('column-search', $field, text);
|
|
this.trigger('column-search', $field, text);
|
|
|
};
|
|
};
|
|
@@ -713,4 +719,17 @@
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+ BootstrapTable.prototype.EnableControls = function(enable) {
|
|
|
|
|
+ if((this.options.disableControlWhenSearch) && (this.options.sidePagination === 'server')) {
|
|
|
|
|
+ var header = getCurrentHeader(this),
|
|
|
|
|
+ searchControls = getCurrentSearchControls(this);
|
|
|
|
|
+
|
|
|
|
|
+ if(!enable) {
|
|
|
|
|
+ header.find(searchControls).prop('disabled', 'disabled');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ header.find(searchControls).removeProp('disabled');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
})(jQuery);
|
|
})(jQuery);
|