mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Click to close search box
This commit is contained in:
		@@ -20,6 +20,7 @@ RED.search = (function() {
 | 
				
			|||||||
    var searchInput;
 | 
					    var searchInput;
 | 
				
			||||||
    var searchResults;
 | 
					    var searchResults;
 | 
				
			||||||
    var selected = -1;
 | 
					    var selected = -1;
 | 
				
			||||||
 | 
					    var visible = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    var index = {};
 | 
					    var index = {};
 | 
				
			||||||
    var keys = [];
 | 
					    var keys = [];
 | 
				
			||||||
@@ -232,16 +233,8 @@ RED.search = (function() {
 | 
				
			|||||||
    function reveal(node) {
 | 
					    function reveal(node) {
 | 
				
			||||||
        hide();
 | 
					        hide();
 | 
				
			||||||
        RED.view.reveal(node.id);
 | 
					        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() {
 | 
					    function show() {
 | 
				
			||||||
        if (!visible) {
 | 
					        if (!visible) {
 | 
				
			||||||
            RED.keyboard.add("*",/* ESCAPE */ 27,function(){hide();d3.event.preventDefault();});
 | 
					            RED.keyboard.add("*",/* ESCAPE */ 27,function(){hide();d3.event.preventDefault();});
 | 
				
			||||||
@@ -276,6 +269,10 @@ RED.search = (function() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    function init() {
 | 
					    function init() {
 | 
				
			||||||
        RED.keyboard.add("*",/* . */ 190,{ctrl:true},function(){show();d3.event.preventDefault();});
 | 
					        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 {
 | 
					    return {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -39,7 +39,7 @@
 | 
				
			|||||||
            "displayConfig": "Configuration nodes",
 | 
					            "displayConfig": "Configuration nodes",
 | 
				
			||||||
            "import": "Import",
 | 
					            "import": "Import",
 | 
				
			||||||
            "export": "Export",
 | 
					            "export": "Export",
 | 
				
			||||||
            "search": "Find",
 | 
					            "search": "Search flows",
 | 
				
			||||||
            "clipboard": "Clipboard",
 | 
					            "clipboard": "Clipboard",
 | 
				
			||||||
            "library": "Library",
 | 
					            "library": "Library",
 | 
				
			||||||
            "examples": "Examples",
 | 
					            "examples": "Examples",
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user