mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-17 05:18:32 +01:00
option to search using Capitals
This commit is contained in:
parent
637222f8b7
commit
d38a266829
@ -319,11 +319,18 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
|||||||
this.bindAttr(['exclude', 'search'], function() {
|
this.bindAttr(['exclude', 'search'], function() {
|
||||||
var data = this.get('data'),
|
var data = this.get('data'),
|
||||||
exclude = this.get('exclude'),
|
exclude = this.get('exclude'),
|
||||||
search = this.get('search').toLowerCase(),
|
search = this.get('search'),
|
||||||
|
caseless = false,
|
||||||
fdata = [];
|
fdata = [];
|
||||||
|
|
||||||
|
if (search && search === search.toLowerCase()) {
|
||||||
|
caseless = true;
|
||||||
|
}
|
||||||
|
|
||||||
for (var i = 0; i < data.length; i++) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
if ((!data[i].label || $.inArray(data[i].label, exclude) === -1) && (!search || data[i].message.toLowerCase().indexOf(search) > -1)) {
|
var message = caseless ? data[i].message.toLowerCase() : data[i].message;
|
||||||
|
|
||||||
|
if ((!data[i].label || $.inArray(data[i].label, exclude) === -1) && (!search || message.indexOf(search) > -1)) {
|
||||||
fdata.push(data[i]);
|
fdata.push(data[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user