mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Make catch/status/complete/link filter case-insensitive
This commit is contained in:
		@@ -50,13 +50,13 @@
 | 
				
			|||||||
                style: "compact",
 | 
					                style: "compact",
 | 
				
			||||||
                delay: 300,
 | 
					                delay: 300,
 | 
				
			||||||
                change: function() {
 | 
					                change: function() {
 | 
				
			||||||
                    var val = $(this).val().trim();
 | 
					                    var val = $(this).val().trim().toLowerCase();
 | 
				
			||||||
                    if (val === "") {
 | 
					                    if (val === "") {
 | 
				
			||||||
                        dirList.treeList("filter", null);
 | 
					                        dirList.treeList("filter", null);
 | 
				
			||||||
                        search.searchBox("count","");
 | 
					                        search.searchBox("count","");
 | 
				
			||||||
                    } else {
 | 
					                    } else {
 | 
				
			||||||
                        var count = dirList.treeList("filter", function(item) {
 | 
					                        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);
 | 
					                        search.searchBox("count",count+" / "+candidateNodes.length);
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -65,13 +65,13 @@
 | 
				
			|||||||
                style: "compact",
 | 
					                style: "compact",
 | 
				
			||||||
                delay: 300,
 | 
					                delay: 300,
 | 
				
			||||||
                change: function() {
 | 
					                change: function() {
 | 
				
			||||||
                    var val = $(this).val().trim();
 | 
					                    var val = $(this).val().trim().toLowerCase();
 | 
				
			||||||
                    if (val === "") {
 | 
					                    if (val === "") {
 | 
				
			||||||
                        dirList.treeList("filter", null);
 | 
					                        dirList.treeList("filter", null);
 | 
				
			||||||
                        search.searchBox("count","");
 | 
					                        search.searchBox("count","");
 | 
				
			||||||
                    } else {
 | 
					                    } else {
 | 
				
			||||||
                        var count = dirList.treeList("filter", function(item) {
 | 
					                        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);
 | 
					                        search.searchBox("count",count+" / "+candidateNodes.length);
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -53,13 +53,13 @@
 | 
				
			|||||||
                style: "compact",
 | 
					                style: "compact",
 | 
				
			||||||
                delay: 300,
 | 
					                delay: 300,
 | 
				
			||||||
                change: function() {
 | 
					                change: function() {
 | 
				
			||||||
                    var val = $(this).val().trim();
 | 
					                    var val = $(this).val().trim().toLowerCase();
 | 
				
			||||||
                    if (val === "") {
 | 
					                    if (val === "") {
 | 
				
			||||||
                        dirList.treeList("filter", null);
 | 
					                        dirList.treeList("filter", null);
 | 
				
			||||||
                        search.searchBox("count","");
 | 
					                        search.searchBox("count","");
 | 
				
			||||||
                    } else {
 | 
					                    } else {
 | 
				
			||||||
                        var count = dirList.treeList("filter", function(item) {
 | 
					                        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);
 | 
					                        search.searchBox("count",count+" / "+candidateNodes.length);
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -53,13 +53,13 @@
 | 
				
			|||||||
            style: "compact",
 | 
					            style: "compact",
 | 
				
			||||||
            delay: 300,
 | 
					            delay: 300,
 | 
				
			||||||
            change: function() {
 | 
					            change: function() {
 | 
				
			||||||
                var val = $(this).val().trim();
 | 
					                var val = $(this).val().trim().toLowerCase();
 | 
				
			||||||
                if (val === "") {
 | 
					                if (val === "") {
 | 
				
			||||||
                    treeList.treeList("filter", null);
 | 
					                    treeList.treeList("filter", null);
 | 
				
			||||||
                    search.searchBox("count","");
 | 
					                    search.searchBox("count","");
 | 
				
			||||||
                } else {
 | 
					                } else {
 | 
				
			||||||
                    var count = treeList.treeList("filter", function(item) {
 | 
					                    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);
 | 
					                    search.searchBox("count",count+" / "+candidateNodes.length);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user