I'm working on a custom node where I want the user to confirm an destructive action.
My question is the editors alert box available from a custom node config dialog an how:
I like to ask the user first to make sure that the erase button isn't hit by accident:
Here you go:
// Example usage for a modal dialog with buttons
var myNotification = RED.notify("This is the message to display",{
modal: true,
fixed: true,
// type: 'warning', // can be null, 'compact', 'success', 'warning', 'error'
buttons: [
{
text: RED._("common.label.cancel"),
click: function(e) {
myNotification.close();
}
},
{
text: RED._("common.label.ok"),
class:"primary",
click: function(e) {
myNotification.close();
}
}
]
});
1 Like
that will do the job!
Thank you for the fast response (on a Sunday)
system
Closed
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.