Add 'changed' property to nodes to track undeployed changes

Part of #33
This commit is contained in:
Nicholas O'Leary
2013-11-15 23:40:36 +00:00
parent f7fc0760ca
commit e703fa1b6b
4 changed files with 18 additions and 3 deletions

View File

@@ -36,8 +36,15 @@ var RED = function() {
if (resp && resp.status == 204) {
RED.notify("Successfully deployed","success");
RED.view.dirty(false);
RED.nodes.eachNode(function(node) {
if (node.changed) {
node.dirty = true;
node.changed = false;
}
});
// Once deployed, cannot undo back to a clean state
RED.history.markAllDirty();
RED.view.redraw();
} else {
if (resp) {
RED.notify("<strong>Error</strong>: "+resp,"error");