mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Warn when leaving editor with undeployed changes
This commit is contained in:
		| @@ -72,12 +72,15 @@ RED.deploy = (function() { | ||||
|          | ||||
|         RED.nodes.on('change',function(state) { | ||||
|             if (state.dirty) { | ||||
|                 window.onbeforeunload = function() { | ||||
|                     return "You have undeploy changes.\n\nLeaving this page will lose these changes."; | ||||
|                 } | ||||
|                 $("#btn-deploy").removeClass("disabled"); | ||||
|             } else { | ||||
|                 window.onbeforeunload = null; | ||||
|                 $("#btn-deploy").addClass("disabled"); | ||||
|             } | ||||
|         }); | ||||
|          | ||||
|     } | ||||
|      | ||||
|     function save(force) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user