Add editor events component and migrate to it

This commit is contained in:
Nick O'Leary
2015-07-10 19:49:31 +01:00
parent 60539d890b
commit 999cf66b27
11 changed files with 66 additions and 102 deletions

View File

@@ -111,7 +111,7 @@ RED.deploy = (function() {
}
});
RED.nodes.on('change',function(state) {
RED.events.on('nodes:change',function(state) {
if (state.dirty) {
window.onbeforeunload = function() {
return RED._("deploy.confirm.undeployedChanges");
@@ -233,6 +233,7 @@ RED.deploy = (function() {
// Once deployed, cannot undo back to a clean state
RED.history.markAllDirty();
RED.view.redraw();
RED.events.emit("deploy");
}).fail(function(xhr,textStatus,err) {
RED.nodes.dirty(true);
if (xhr.responseText) {