Constructor and Description |
---|
Bootbox() |
Modifier and Type | Method and Description |
---|---|
static void |
alert(AlertOptions options)
Displays a customized alert with the given
AlertOptions . |
static void |
alert(String msg)
Displays a message in a modal dialog box.
|
static void |
alert(String msg,
SimpleCallback callback)
Displays a message in a modal dialog box.
|
static void |
confirm(ConfirmOptions options)
Displays a customized confirm with the given
ConfirmOptions . |
static void |
confirm(String msg,
ConfirmCallback callback)
Displays a message in a modal dialog box, along with the standard 'OK' and
'Cancel' buttons.
|
static void |
dialog(DialogOptions options)
Displays a completely customizable dialog in a modal dialog box.
|
static void |
hideAll()
Hide all currently active bootbox dialogs.
|
static void |
init(SimpleCallback callback)
Sets a callback when dialog gets initialized.
|
static void |
prompt(PromptOptions options)
Displays a customized prompt with the given
PromptOptions . |
static void |
prompt(String msg,
PromptCallback callback)
Displays a request for information in a modal dialog box, along with the
standard 'OK' and 'Cancel' buttons.
|
static void |
setDefaults(DialogOptions options)
Set many of the default options shown in the dialog example.
Many of these options are also applied to the basic wrapper methods and can be overridden whenever the wrapper methods are invoked with a single options argument. |
static void |
setLocale(BootboxLocale locale)
Sets a locale.
|
public Bootbox()
public static void alert(String msg)
msg
- the message to be displayed.public static void alert(String msg, SimpleCallback callback)
msg
- the message to be displayed.callback
- the callback handler.public static void alert(AlertOptions options)
AlertOptions
.options
- public static void confirm(String msg, ConfirmCallback callback)
msg
- the message to be displayed.callback
- the callback handler.public static void confirm(ConfirmOptions options)
ConfirmOptions
.options
- public static void prompt(String msg, PromptCallback callback)
msg
- the message to be displayed.callback
- the callback handler.public static void prompt(PromptOptions options)
PromptOptions
.options
- public static void dialog(DialogOptions options)
options
- the dialog options.public static void init(SimpleCallback callback)
callback
- public static void setDefaults(DialogOptions options)
options
- public static void setLocale(BootboxLocale locale)
locale
- if null
, defaults to BootboxLocale.EN
.public static void hideAll()
Individual dialogs can be closed as per normal Bootstrap dialogs: dialog.modal('hide').
Copyright © 2017. All rights reserved.