Client
alert
fjsf.alert(title, description, cancel, content, data)Displays a modal alert dialog rendered in NUI and waits for user input.
Parameters
title
stringAlert title displayed at the top.description
stringMain description text of the alert.cancel
boolean | nilWhether the Cancel button should be shown.true/nilβ show Cancel buttonfalseβ hide Cancel button
content
tableList of alert content items rendered inside the alert.Alert content item structure
Each item supports:
text
stringItem title text.description
string | nilOptional description text.type
string | nilPredefined visual style. Allowed values:successerrorwarninginfo
icon
string | nilCustom FontAwesome icon class. Overrides the icon provided bytype.iconAnim
string | nilOptional icon animation class.color
string | nilCustom icon/text color (CSS value).background
string | nilCustom background color (CSS value).
iconAnim
Optional animation applied to the alert icon.
Type: string | nil
Allowed values
spinspinReversespinSlowspinPulsepulsebeatbeatFadefadeblinkSoftbouncefloatorbitshakewiggleticktiltBreathscanpolarFloat
Invalid values are ignored.
data
table | nilAdditional alert configuration.Supported fields:
blur
booleanEnables background blur.size
stringAlert size. Allowed values:smallmediumlarge
Returns
boolean
trueif confirmed,falseif cancelled.
Example
closeAlert
Closes the currently open alert programmatically.
Parameters
result
boolean | nilResult value returned to the awaiting alert promise.
Returns
This function does not return anything.
Example
Last updated