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:
parent
e357352240
commit
79bd01f810
@ -257,6 +257,11 @@ RED.editor = (function() {
|
|||||||
id: "node-dialog-cancel",
|
id: "node-dialog-cancel",
|
||||||
text: "Cancel",
|
text: "Cancel",
|
||||||
click: function() {
|
click: function() {
|
||||||
|
if (editing_node._def) {
|
||||||
|
if (editing_node._def.oneditcancel) {
|
||||||
|
editing_node._def.oneditcancel.call(editing_node,true);
|
||||||
|
}
|
||||||
|
}
|
||||||
$( this ).dialog( "close" );
|
$( this ).dialog( "close" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -267,6 +272,7 @@ RED.editor = (function() {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
open: function(e) {
|
open: function(e) {
|
||||||
|
$(this).parent().find(".ui-dialog-titlebar-close").hide();
|
||||||
RED.keyboard.disable();
|
RED.keyboard.disable();
|
||||||
if (editing_node) {
|
if (editing_node) {
|
||||||
var size = $(this).dialog('option','sizeCache-'+editing_node.type);
|
var size = $(this).dialog('option','sizeCache-'+editing_node.type);
|
||||||
@ -680,7 +686,8 @@ RED.editor = (function() {
|
|||||||
],
|
],
|
||||||
resize: function(e,ui) {
|
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) {
|
if (RED.view.state() != RED.state.EDITING) {
|
||||||
RED.keyboard.disable();
|
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();
|
RED.keyboard.disable();
|
||||||
},
|
},
|
||||||
close: function(e) {
|
close: function(e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user