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

add search options dropdown to regular search

This commit is contained in:
Steve-Mcl 2022-02-03 10:26:50 +00:00
parent 5c87a6cb76
commit c6104195f6
8 changed files with 73 additions and 68 deletions

View File

@ -634,14 +634,7 @@
"empty": "leer",
"globalConfig": "Globale Konfigurations-Nodes",
"triggerAction": "Auslösen",
"find": "Suche im Arbeitsbereich",
"search": {
"configNodes": "Konfigurations-Nodes",
"unusedConfigNodes": "Unbenutzte Konfigurations-Nodes",
"invalidNodes": "Ungültige Nodes",
"uknownNodes": "Unbekannte Nodes",
"unusedSubflows": "Unbenutzte Subflows"
}
"find": "Suche im Arbeitsbereich"
},
"help": {
"name": "Hilfe",
@ -863,7 +856,14 @@
},
"search": {
"empty": "Keine Übereinstimmungen gefunden",
"addNode": "Node hinzufügen ..."
"addNode": "Node hinzufügen ...",
"options": {
"configNodes": "Konfigurations-Nodes",
"unusedConfigNodes": "Unbenutzte Konfigurations-Nodes",
"invalidNodes": "Ungültige Nodes",
"uknownNodes": "Unbekannte Nodes",
"unusedSubflows": "Unbenutzte Subflows"
}
},
"expressionEditor": {
"functions": "Funktionen",

View File

@ -667,15 +667,7 @@
"empty": "empty",
"globalConfig": "Global Configuration Nodes",
"triggerAction": "Trigger action",
"find": "Find in workspace",
"search": {
"configNodes": "Configuration nodes",
"unusedConfigNodes": "Unused configuration nodes",
"invalidNodes": "Invalid nodes",
"uknownNodes": "Unknown nodes",
"unusedSubflows": "Unused subflows",
"hiddenFlows": "Hidden flows"
}
"find": "Find in workspace"
},
"help": {
"name": "Help",
@ -899,7 +891,16 @@
"history": "Search history",
"clear": "clear all",
"empty": "No matches found",
"addNode": "add a node..."
"addNode": "add a node...",
"options": {
"configNodes": "Configuration nodes",
"unusedConfigNodes": "Unused configuration nodes",
"invalidNodes": "Invalid nodes",
"uknownNodes": "Unknown nodes",
"unusedSubflows": "Unused subflows",
"hiddenFlows": "Hidden flows",
"modifiedNodes": "Modified nodes and flows"
}
},
"expressionEditor": {
"functions": "Functions",

View File

@ -667,15 +667,7 @@
"empty": "空",
"globalConfig": "グローバル設定ノード",
"triggerAction": "アクションを実行",
"find": "ワークスペース内を検索",
"search": {
"configNodes": "設定ノード",
"unusedConfigNodes": "未使用の設定ノード",
"invalidNodes": "不正なノード",
"uknownNodes": "未知のノード",
"unusedSubflows": "未使用のサブフロー",
"hiddenFlows": "非表示のフロー"
}
"find": "ワークスペース内を検索"
},
"help": {
"name": "ヘルプ",
@ -899,7 +891,15 @@
"history": "検索履歴",
"clear": "全て削除",
"empty": "一致したものが見つかりませんでした",
"addNode": "ノードを追加..."
"addNode": "ノードを追加...",
"options": {
"configNodes": "設定ノード",
"unusedConfigNodes": "未使用の設定ノード",
"invalidNodes": "不正なノード",
"uknownNodes": "未知のノード",
"unusedSubflows": "未使用のサブフロー",
"hiddenFlows": "非表示のフロー"
}
},
"expressionEditor": {
"functions": "関数",

View File

@ -650,14 +650,7 @@
"empty": "пусто",
"globalConfig": "Глобальные конфиг узлы",
"triggerAction": "Вызвать действие",
"find": "Найти в рабочей области",
"search": {
"configNodes": "Узлы конфигурации",
"unusedConfigNodes": "Неиспользуемые узлы конфигурации",
"invalidNodes": "Недействительные узлы",
"uknownNodes": "Неизвестные узлы",
"unusedSubflows": "Неиспользуемые подпотоки"
}
"find": "Найти в рабочей области"
},
"help": {
"name": "Справка",
@ -888,7 +881,14 @@
},
"search": {
"empty": "Ничего не найдено",
"addNode": "добавить узел..."
"addNode": "добавить узел...",
"options": {
"configNodes": "Узлы конфигурации",
"unusedConfigNodes": "Неиспользуемые узлы конфигурации",
"invalidNodes": "Недействительные узлы",
"uknownNodes": "Неизвестные узлы",
"unusedSubflows": "Неиспользуемые подпотоки"
}
},
"expressionEditor": {
"functions": "Функции",

View File

@ -614,14 +614,7 @@
"empty": "空的",
"globalConfig": "全局配置节点",
"triggerAction": "触发动作",
"find": "在工作区中查找",
"search": {
"configNodes": "配置节点",
"unusedConfigNodes": "未使用的配置节点",
"invalidNodes": "无效的节点",
"uknownNodes": "未知的节点",
"unusedSubflows": "未使用的子流程"
}
"find": "在工作区中查找"
},
"help": {
"name": "帮助",
@ -842,7 +835,14 @@
},
"search": {
"empty": "找不到匹配",
"addNode": "添加一个节点..."
"addNode": "添加一个节点...",
"options": {
"configNodes": "配置节点",
"unusedConfigNodes": "未使用的配置节点",
"invalidNodes": "无效的节点",
"uknownNodes": "未知的节点",
"unusedSubflows": "未使用的子流程"
}
},
"expressionEditor": {
"functions": "功能",

View File

@ -614,14 +614,7 @@
"empty": "空的",
"globalConfig": "全局配置節點",
"triggerAction": "觸發動作",
"find": "在工作區中查找",
"search": {
"configNodes": "配置節點",
"unusedConfigNodes": "未使用的配置節點",
"invalidNodes": "無效的節點",
"uknownNodes": "未知的節點",
"unusedSubflows": "未使用的子流程"
}
"find": "在工作區中查找"
},
"help": {
"name": "幫助",
@ -842,7 +835,14 @@
},
"search": {
"empty": "找不到匹配",
"addNode": "添加一個節點..."
"addNode": "添加一個節點...",
"options": {
"configNodes": "配置節點",
"unusedConfigNodes": "未使用的配置節點",
"invalidNodes": "無效的節點",
"uknownNodes": "未知的節點",
"unusedSubflows": "未使用的子流程"
}
},
"expressionEditor": {
"functions": "功能",

View File

@ -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
};
})();

View File

@ -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)