mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
add search options dropdown to regular search
This commit is contained in:
@@ -261,9 +261,8 @@ RED.search = (function() {
|
||||
} else {
|
||||
searchResults.editableList('addItem',{});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
options: getSearchOptions()
|
||||
});
|
||||
var copySearchContainer = $('<button type="button" class="red-ui-button red-ui-button-small"><i class="fa fa-caret-right"></button>').appendTo(searchDiv).on('click', function(evt) {
|
||||
evt.preventDefault();
|
||||
@@ -498,6 +497,17 @@ RED.search = (function() {
|
||||
addItemToIndex(item);
|
||||
}
|
||||
|
||||
function getSearchOptions() {
|
||||
return [
|
||||
{label:RED._("search.options.configNodes"), value:"is:config"},
|
||||
{label:RED._("search.options.unusedConfigNodes"), value:"is:config is:unused"},
|
||||
{label:RED._("search.options.modifiedNodes"), value:"is:modified"},
|
||||
{label:RED._("search.options.invalidNodes"), value: "is:invalid"},
|
||||
{label:RED._("search.options.uknownNodes"), value: "type:unknown"},
|
||||
{label:RED._("search.options.unusedSubflows"), value:"is:subflow is:unused"},
|
||||
{label:RED._("search.options.hiddenFlows"), value:"is:hidden"},
|
||||
]
|
||||
}
|
||||
|
||||
function init() {
|
||||
RED.actions.add("core:search",show);
|
||||
@@ -541,7 +551,8 @@ RED.search = (function() {
|
||||
init: init,
|
||||
show: show,
|
||||
hide: hide,
|
||||
search: search
|
||||
search: search,
|
||||
getSearchOptions: getSearchOptions
|
||||
};
|
||||
|
||||
})();
|
||||
|
@@ -268,14 +268,7 @@ RED.sidebar.info.outliner = (function() {
|
||||
|
||||
}
|
||||
},
|
||||
options: [
|
||||
{label:RED._("sidebar.info.search.configNodes"), value:"is:config"},
|
||||
{label:RED._("sidebar.info.search.unusedConfigNodes"), value:"is:config is:unused"},
|
||||
{label:RED._("sidebar.info.search.invalidNodes"), value: "is:invalid"},
|
||||
{label:RED._("sidebar.info.search.uknownNodes"), value: "type:unknown"},
|
||||
{label:RED._("sidebar.info.search.unusedSubflows"), value:"is:subflow is:unused"},
|
||||
{label:RED._("sidebar.info.search.hiddenFlows"), value:"is:hidden"},
|
||||
]
|
||||
options: RED.search.getSearchOptions()
|
||||
});
|
||||
|
||||
projectInfo = $('<div class="red-ui-treeList-label red-ui-info-outline-project"><span class="red-ui-treeList-icon"><i class="fa fa-archive"></i></span></div>').hide().appendTo(container)
|
||||
|
Reference in New Issue
Block a user