Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
titleExample 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
languagejs
firstlinetitleExample 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
languagejs
titleExample with moretext
akioma.swat.Message.message({
    title: "Error",
    type: "error",
    text: "Something went wrong!",
    modal: true,
    expire : 5000,
    moretext: 'More informations here'
});