1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Make catch/status/complete/link filter case-insensitive

This commit is contained in:
Nick O'Leary 2020-06-05 16:00:02 +01:00
parent 091a462a42
commit ad6b18e66f
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
4 changed files with 8 additions and 8 deletions

View File

@ -50,13 +50,13 @@
style: "compact",
delay: 300,
change: function() {
var val = $(this).val().trim();
var val = $(this).val().trim().toLowerCase();
if (val === "") {
dirList.treeList("filter", null);
search.searchBox("count","");
} else {
var count = dirList.treeList("filter", function(item) {
return item.label.indexOf(val) > -1 || item.node.type.indexOf(val) > -1
return item.label.toLowerCase().indexOf(val) > -1 || item.node.type.toLowerCase().indexOf(val) > -1
});
search.searchBox("count",count+" / "+candidateNodes.length);
}

View File

@ -65,13 +65,13 @@
style: "compact",
delay: 300,
change: function() {
var val = $(this).val().trim();
var val = $(this).val().trim().toLowerCase();
if (val === "") {
dirList.treeList("filter", null);
search.searchBox("count","");
} else {
var count = dirList.treeList("filter", function(item) {
return item.label.indexOf(val) > -1 || item.node.type.indexOf(val) > -1
return item.label.toLowerCase().indexOf(val) > -1 || item.node.type.toLowerCase().indexOf(val) > -1
});
search.searchBox("count",count+" / "+candidateNodes.length);
}

View File

@ -53,13 +53,13 @@
style: "compact",
delay: 300,
change: function() {
var val = $(this).val().trim();
var val = $(this).val().trim().toLowerCase();
if (val === "") {
dirList.treeList("filter", null);
search.searchBox("count","");
} else {
var count = dirList.treeList("filter", function(item) {
return item.label.indexOf(val) > -1 || item.node.type.indexOf(val) > -1
return item.label.toLowerCase().indexOf(val) > -1 || item.node.type.toLowerCase().indexOf(val) > -1
});
search.searchBox("count",count+" / "+candidateNodes.length);
}

View File

@ -53,13 +53,13 @@
style: "compact",
delay: 300,
change: function() {
var val = $(this).val().trim();
var val = $(this).val().trim().toLowerCase();
if (val === "") {
treeList.treeList("filter", null);
search.searchBox("count","");
} else {
var count = treeList.treeList("filter", function(item) {
return item.label.indexOf(val) > -1 || item.node.type.indexOf(val) > -1
return item.label.toLowerCase().indexOf(val) > -1 || item.node.type.toLowerCase().indexOf(val) > -1
});
search.searchBox("count",count+" / "+candidateNodes.length);
}