diff --git a/public/red/ui/editor.js b/public/red/ui/editor.js index 3e121a968..37c164692 100644 --- a/public/red/ui/editor.js +++ b/public/red/ui/editor.js @@ -257,6 +257,11 @@ RED.editor = (function() { id: "node-dialog-cancel", text: "Cancel", click: function() { + if (editing_node._def) { + if (editing_node._def.oneditcancel) { + editing_node._def.oneditcancel.call(editing_node,true); + } + } $( this ).dialog( "close" ); } } @@ -267,6 +272,7 @@ RED.editor = (function() { } }, open: function(e) { + $(this).parent().find(".ui-dialog-titlebar-close").hide(); RED.keyboard.disable(); if (editing_node) { var size = $(this).dialog('option','sizeCache-'+editing_node.type); @@ -680,7 +686,8 @@ RED.editor = (function() { ], resize: function(e,ui) { }, - open: function(e) { + open: function(e,ui) { + $(this).parent().find(".ui-dialog-titlebar-close").hide(); if (RED.view.state() != RED.state.EDITING) { RED.keyboard.disable(); } @@ -756,7 +763,8 @@ RED.editor = (function() { } } ], - open: function(e) { + open: function(e,ui) { + $(this).parent().find(".ui-dialog-titlebar-close").hide(); RED.keyboard.disable(); }, close: function(e) {