mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Merge pull request #3337 from node-red-hitachi/fix-selection
resume focus after import/export dialog close
This commit is contained in:
		| @@ -71,6 +71,7 @@ RED.clipboard = (function() { | ||||
|                         text: RED._("common.label.cancel"), | ||||
|                         click: function() { | ||||
|                             $( this ).dialog( "close" ); | ||||
|                             RED.view.focus(); | ||||
|                         } | ||||
|                     }, | ||||
|                     { // red-ui-clipboard-dialog-download | ||||
| @@ -81,6 +82,7 @@ RED.clipboard = (function() { | ||||
|                             var data = $("#red-ui-clipboard-dialog-export-text").val(); | ||||
|                             downloadData("flows.json", data); | ||||
|                             $( this ).dialog( "close" ); | ||||
|                             RED.view.focus(); | ||||
|                         } | ||||
|                     }, | ||||
|                     { // red-ui-clipboard-dialog-export | ||||
| @@ -95,6 +97,7 @@ RED.clipboard = (function() { | ||||
|                                 $( this ).dialog( "close" ); | ||||
|                                 copyText(flowData); | ||||
|                                 RED.notify(RED._("clipboard.nodesExported"),{id:"clipboard"}); | ||||
|                                 RED.view.focus(); | ||||
|                             } else { | ||||
|                                 var flowToExport = $("#red-ui-clipboard-dialog-export-text").val(); | ||||
|                                 var selectedPath = activeLibraries[activeTab].getSelected(); | ||||
| @@ -110,6 +113,7 @@ RED.clipboard = (function() { | ||||
|                                         contentType: "application/json; charset=utf-8" | ||||
|                                     }).done(function() { | ||||
|                                         $(dialog).dialog( "close" ); | ||||
|                                         RED.view.focus(); | ||||
|                                         RED.notify(RED._("library.exportedToLibrary"),"success"); | ||||
|                                     }).fail(function(xhr,textStatus,err) { | ||||
|                                         if (xhr.status === 401) { | ||||
| @@ -171,6 +175,7 @@ RED.clipboard = (function() { | ||||
|                                 } | ||||
|                             } | ||||
|                             $( this ).dialog( "close" ); | ||||
|                             RED.view.focus(); | ||||
|                         } | ||||
|                     }, | ||||
|                     { // red-ui-clipboard-dialog-import-conflict | ||||
| @@ -203,6 +208,7 @@ RED.clipboard = (function() { | ||||
|                             // console.table(pendingImportConfig.importNodes.map(function(n) { return {id:n.id,type:n.type,result:importMap[n.id]}})) | ||||
|                             RED.view.importNodes(newNodes, pendingImportConfig.importOptions); | ||||
|                             $( this ).dialog( "close" ); | ||||
|                             RED.view.focus(); | ||||
|                         } | ||||
|                     } | ||||
|                 ], | ||||
|   | ||||
		Reference in New Issue
	
	Block a user