mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-16 21:08:34 +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() {
|
||||
var data = this.get('data'),
|
||||
exclude = this.get('exclude'),
|
||||
search = this.get('search').toLowerCase(),
|
||||
search = this.get('search'),
|
||||
caseless = false,
|
||||
fdata = [];
|
||||
|
||||
if (search && search === search.toLowerCase()) {
|
||||
caseless = true;
|
||||
}
|
||||
|
||||
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]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user