mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Click to close search box
This commit is contained in:
parent
e3b7c5fce7
commit
300a8d3a89
@ -20,6 +20,7 @@ RED.search = (function() {
|
||||
var searchInput;
|
||||
var searchResults;
|
||||
var selected = -1;
|
||||
var visible = false;
|
||||
|
||||
var index = {};
|
||||
var keys = [];
|
||||
@ -232,16 +233,8 @@ RED.search = (function() {
|
||||
function reveal(node) {
|
||||
hide();
|
||||
RED.view.reveal(node.id);
|
||||
// if (node.type === 'tab' || node.type === 'subflow') {
|
||||
// RED.workspaces.show(node.id);
|
||||
// } else {
|
||||
// if (node._def.category !== 'config' && node.z) {
|
||||
// RED.workspaces.show(node.z);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
var visible = false;
|
||||
function show() {
|
||||
if (!visible) {
|
||||
RED.keyboard.add("*",/* ESCAPE */ 27,function(){hide();d3.event.preventDefault();});
|
||||
@ -276,6 +269,10 @@ RED.search = (function() {
|
||||
|
||||
function init() {
|
||||
RED.keyboard.add("*",/* . */ 190,{ctrl:true},function(){show();d3.event.preventDefault();});
|
||||
$("#header-shade").on('mousedown',hide);
|
||||
$("#editor-shade").on('mousedown',hide);
|
||||
$("#palette-shade").on('mousedown',hide);
|
||||
$("#sidebar-shade").on('mousedown',hide);
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -39,7 +39,7 @@
|
||||
"displayConfig": "Configuration nodes",
|
||||
"import": "Import",
|
||||
"export": "Export",
|
||||
"search": "Find",
|
||||
"search": "Search flows",
|
||||
"clipboard": "Clipboard",
|
||||
"library": "Library",
|
||||
"examples": "Examples",
|
||||
|
Loading…
Reference in New Issue
Block a user