|
@@ -329,6 +329,13 @@
|
|
|
_init.apply(this, Array.prototype.slice.apply(arguments));
|
|
_init.apply(this, Array.prototype.slice.apply(arguments));
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ $.extend($.fn.bootstrapTable.locales, {
|
|
|
|
|
+ formatClearFilters: function () {
|
|
|
|
|
+ return 'Clear Filters';
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
|
|
|
|
|
+
|
|
|
BootstrapTable.prototype.initToolbar = function () {
|
|
BootstrapTable.prototype.initToolbar = function () {
|
|
|
if ((!this.showToolbar) && (this.options.filterControl)) {
|
|
if ((!this.showToolbar) && (this.options.filterControl)) {
|
|
|
this.showToolbar = this.options.filterControl;
|
|
this.showToolbar = this.options.filterControl;
|
|
@@ -342,8 +349,8 @@
|
|
|
|
|
|
|
|
if (!$btnClear.length) {
|
|
if (!$btnClear.length) {
|
|
|
$btnClear = $([
|
|
$btnClear = $([
|
|
|
- '<button class="btn btn-default " ' +
|
|
|
|
|
- 'type="button">',
|
|
|
|
|
|
|
+ '<button class="btn btn-default" ',
|
|
|
|
|
+ sprintf('type="button" title="%s">', this.options.formatClearFilters()),
|
|
|
sprintf('<i class="%s %s"></i> ', this.options.iconsPrefix, this.options.icons.clear),
|
|
sprintf('<i class="%s %s"></i> ', this.options.iconsPrefix, this.options.icons.clear),
|
|
|
'</button>',
|
|
'</button>',
|
|
|
'</ul>'].join('')).appendTo($btnGroup);
|
|
'</ul>'].join('')).appendTo($btnGroup);
|
|
@@ -422,14 +429,14 @@
|
|
|
[value, item, i], value);
|
|
[value, item, i], value);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(thisColumn.filterStrictSearch){
|
|
|
|
|
|
|
+ if (thisColumn.filterStrictSearch) {
|
|
|
if (!($.inArray(key, that.header.fields) !== -1 &&
|
|
if (!($.inArray(key, that.header.fields) !== -1 &&
|
|
|
(typeof value === 'string' || typeof value === 'number') &&
|
|
(typeof value === 'string' || typeof value === 'number') &&
|
|
|
value.toString().toLowerCase() === fval.toString().toLowerCase())) {
|
|
value.toString().toLowerCase() === fval.toString().toLowerCase())) {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- else{
|
|
|
|
|
|
|
+ else {
|
|
|
if (!($.inArray(key, that.header.fields) !== -1 &&
|
|
if (!($.inArray(key, that.header.fields) !== -1 &&
|
|
|
(typeof value === 'string' || typeof value === 'number') &&
|
|
(typeof value === 'string' || typeof value === 'number') &&
|
|
|
(value + '').toLowerCase().indexOf(fval) !== -1)) {
|
|
(value + '').toLowerCase().indexOf(fval) !== -1)) {
|