1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Remove X button on dialogs

Fixes #561

Also, oneditcancel not being honoured for regular nodes, only config nodes
This commit is contained in:
Nick O'Leary 2015-02-13 10:06:28 +00:00
parent e357352240
commit 79bd01f810

View File

@ -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) {