Commit aee367e1 authored by bbaer's avatar bbaer
Browse files

Updated protocol.md with Alert description

parent eebd5e69
......@@ -31,6 +31,39 @@ the server (`"success"`) or encountered an error (`"error"`). On
Depending on the request, the server may provide additional
information in the response, as outlined below.
### Alert
{
"message": "<message>",
"type": "<type of message>",
"timeout": <timeout in milliseconds>,
"modal": <boolean>,
"buttons": [{
"label": "<label>",
"eventName": "<eventName>",
"focus": <boolean>
}]
}
`"type"`
: can be `"info"`, `"warning"`, or `"error"`. Default is `"info"`.
`"timeout"`
: If timeout is less than or equal to 0, the alert won't timeout and stay open until dismissed by the user. Default `n.Alert.constants.NO_TIMEOUT`.
`"modal"`
: whether or not alert is modal, i.e. prevent clicks anywhere but the dialog. Default is `false`.
`"buttons"`
: what buttons to display on alert. If empty array is provided, no buttons are displayed and a click anywhere in the alert will dismiss it.
`"buttons.label"`
: Label of the button.
`"buttons.eventName"`
: Name of the event to be executed when button is clicked.
`"buttons.focus"`
: Whether or not button has focus by default. Default is `false`.
### HTML Form Element Validation Response
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment