...
Code Block |
---|
language | js |
---|
title | Example with buttons as object and more text: |
---|
|
akioma.swat.Message.message({
title: "Success",
type: "Success",
text: "Everything went good!",
modal: true,
buttons: {
ok: {
text: 'Ok',
value: 'ok was pressed'
},
cancel: {
text: 'cancel',
value: 'cancel was presses'
}
},
expire : 5000,
moretext: 'More informations here'
}); |
...
If the buttons attribute is an array, we can specify max 2 buttons. When more than 2 buttons are added, the array will became an object to avoid errors.
Code Block |
---|
language | js |
---|
firstlinetitle | Example with buttons as array and more text: |
---|
|
akioma.swat.Message.message({
title: "Warning",
type: "warning",
text: "Be carefull",
modal: true,
buttons: ["Continue"], expire : 5000"Cancel"],
moretext: 'More informations here'
}); |
Code Block |
---|
language | js |
---|
title | Example with moretext |
---|
|
akioma.swat.Message.message({
title: "Error",
type: "error",
text: "Something went wrong!",
modal: true,
expire : 5000,
moretext: 'More informations here'
}); |