diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js index b707ccbf5..c51ef1e42 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/searchBox.js @@ -38,6 +38,11 @@ this.element.addClass("red-ui-searchBox-input"); this.uiContainer = this.element.wrap("
").parent(); this.uiContainer.addClass("red-ui-searchBox-container"); + + if (this.options.style === "compact") { + this.uiContainer.addClass("red-ui-searchBox-compact"); + } + if (this.element.parents("form").length === 0) { var form = this.element.wrap("
").parent(); form.addClass("red-ui-searchBox-form"); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js index ccecfd043..41bd475dd 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js @@ -202,6 +202,7 @@ RED.sidebar.info.outliner = (function() { var toolbar = $("
", {class:"red-ui-sidebar-header red-ui-info-toolbar"}).appendTo(container); searchInput = $('').appendTo(toolbar).searchBox({ + style: "compact", delay: 300, change: function() { var val = $(this).val(); diff --git a/packages/node_modules/@node-red/editor-client/src/sass/tab-info.scss b/packages/node_modules/@node-red/editor-client/src/sass/tab-info.scss index c98bdb6ad..f51622b89 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/tab-info.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/tab-info.scss @@ -504,18 +504,6 @@ div.red-ui-info-table { width: calc(100% - 150px); max-width: 250px; background: $palette-header-background; - input.red-ui-searchBox-input { - border: 1px solid $secondary-border-color; - border-radius: 3px; - font-size: 12px; - height: 26px; - } - input:focus.red-ui-searchBox-input { - border: 1px solid $secondary-border-color; - } - i.fa-search, i.fa-times { - top: 7px; - } } } diff --git a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/searchBox.scss b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/searchBox.scss index d0cd631fc..b37e6e5fc 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/ui/common/searchBox.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/ui/common/searchBox.scss @@ -71,3 +71,14 @@ border-radius: 4px; } } +.red-ui-searchBox-compact { + input.red-ui-searchBox-input,input:focus.red-ui-searchBox-input { + border: 1px solid $secondary-border-color; + border-radius: 3px; + font-size: 12px; + height: 26px; + } + i.fa-times,i.fa-search { + top: 7px; + } +} \ No newline at end of file diff --git a/packages/node_modules/@node-red/nodes/core/common/24-complete.html b/packages/node_modules/@node-red/nodes/core/common/24-complete.html index e027fe2d7..4efeec382 100644 --- a/packages/node_modules/@node-red/nodes/core/common/24-complete.html +++ b/packages/node_modules/@node-red/nodes/core/common/24-complete.html @@ -2,7 +2,8 @@
-
+
+
@@ -45,6 +46,20 @@ var editorRow = $("#dialog-form>div.node-input-target-list-row"); editorRow.css("height",height+"px"); }; + $("#node-input-complete-target-filter").searchBox({ + style: "compact", + delay: 300, + change: function() { + var val = $(this).val().trim(); + if (val === "") { + dirList.treeList("filter", null); + } else { + dirList.treeList("filter", function(item) { + return item.label.indexOf(val) > -1 + }); + } + } + }); var dirList = $("#node-input-complete-target-container-div").css({width: "100%", height: "100%"}) .treeList({multi:true}).on("treelistitemmouseover", function(e, item) { diff --git a/packages/node_modules/@node-red/nodes/core/common/25-catch.html b/packages/node_modules/@node-red/nodes/core/common/25-catch.html index e25f1b90a..a13d769d1 100644 --- a/packages/node_modules/@node-red/nodes/core/common/25-catch.html +++ b/packages/node_modules/@node-red/nodes/core/common/25-catch.html @@ -14,7 +14,8 @@
-
+
+
@@ -60,7 +61,20 @@ var editorRow = $("#dialog-form>div.node-input-target-list-row"); editorRow.css("height",height+"px"); }; - + $("#node-input-catch-target-filter").searchBox({ + style: "compact", + delay: 300, + change: function() { + var val = $(this).val().trim(); + if (val === "") { + dirList.treeList("filter", null); + } else { + dirList.treeList("filter", function(item) { + return item.label.indexOf(val) > -1 + }); + } + } + }); var dirList = $("#node-input-catch-target-container-div").css({width: "100%", height: "100%"}) .treeList({multi:true}).on("treelistitemmouseover", function(e, item) { item.node.highlighted = true; diff --git a/packages/node_modules/@node-red/nodes/core/common/25-status.html b/packages/node_modules/@node-red/nodes/core/common/25-status.html index 0235c3efb..1f517a4aa 100644 --- a/packages/node_modules/@node-red/nodes/core/common/25-status.html +++ b/packages/node_modules/@node-red/nodes/core/common/25-status.html @@ -10,7 +10,8 @@
-
+
+
@@ -48,6 +49,20 @@ var editorRow = $("#dialog-form>div.node-input-target-list-row"); editorRow.css("height",height+"px"); }; + $("#node-input-status-target-filter").searchBox({ + style: "compact", + delay: 300, + change: function() { + var val = $(this).val().trim(); + if (val === "") { + dirList.treeList("filter", null); + } else { + dirList.treeList("filter", function(item) { + return item.label.indexOf(val) > -1 + }); + } + } + }); var dirList = $("#node-input-status-target-container-div").css({width: "100%", height: "100%"}) .treeList({multi:true}).on("treelistitemmouseover", function(e, item) {