Package: | Roo.bootstrap |
Defined In: | Roo/bootstrap/MessageBox.js. |
Class: | MessageBox |
// Basic alert:
Roo.Msg.alert('Status', 'Changes saved successfully.');
// Prompt for user data:
Roo.Msg.prompt('Name', 'Please enter your name:', function(btn, text){
if (btn == 'ok'){
// process text value...
}
});
// Show a dialog using config options:
Roo.Msg.show({
title:'Save Changes?',
msg: 'Your are closing a tab that has unsaved changes. Would you like to save your changes?',
buttons: Roo.Msg.YESNOCANCEL,
fn: processResult,
animEl: 'elId'
});
Method | Defined By | |
---|---|---|
Roo.bootstrap.MessageBox.alert
(String title, String msg, Function fn, Object scope)
:
Roo.MessageBox
Displays a standard read-only message box with an OK button (comparable to the basic JavaScript Window.alert).
Displays a standard read-only message box with an OK button (comparable to the basic JavaScript Window.alert).
If a callback function is passed it will be called after the user clicks the button, and the id of the button that was clicked will be passed as the only parameter to the callback (could also be the top-right close button).
|
Roo.bootstrap.MessageBox | |
Roo.bootstrap.MessageBox.confirm
(String title, String msg, Function fn, Object scope)
:
Roo.MessageBox
Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's Window.confirm).
Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's Window.confirm).
If a callback function is passed it will be called after the user clicks either button, and the id of the button that was clicked will be passed as the only parameter to the callback (could also be the top-right close button).
|
Roo.bootstrap.MessageBox | |
Roo.bootstrap.MessageBox.getDialog
()
:
Roo.BasicDialog
Returns a reference to the underlying {link Roo.BasicDialog} element
Returns a reference to the underlying {link Roo.BasicDialog} element
|
Roo.bootstrap.MessageBox | |
Roo.bootstrap.MessageBox.hide
()
Hides the message box if it is displayed
Hides the message box if it is displayed
|
Roo.bootstrap.MessageBox | |
Roo.bootstrap.MessageBox.isVisible
()
:
Boolean
Returns true if the message box is currently displayed
Returns true if the message box is currently displayed
|
Roo.bootstrap.MessageBox | |
Displays a message box with a progress bar.
Displays a message box with a progress bar. This message box has no buttons and is not closeable by
the user. You are responsible for updating the progress bar as needed via {link Roo.MessageBoxupdateProgress} and closing the message box when the process is complete.
|
Roo.bootstrap.MessageBox | |
Roo.bootstrap.MessageBox.prompt
(String title, String msg, Function fn, Object scope, Boolean/Number multiline)
:
Roo.MessageBox
Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to
JavaScript's Window.prompt).
Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to
JavaScript's Window.prompt). The prompt can be a single-line or multi-line textbox. If a callback function is passed it will be called after the user clicks either button, and the id of the button that was clicked (could also be the top-right close button) and the text that was entered will be passed as the two parameters to the callback.
|
Roo.bootstrap.MessageBox | |
Displays a new message box, or reinitializes an existing message box, based on the config options
passed in.
Displays a new message box, or reinitializes an existing message box, based on the config options
passed in. All functions (e.g. prompt, alert, etc) on MessageBox call this function internally. The following config object properties are supported:
Example usage:
|
Roo.bootstrap.MessageBox | |
Updates a progress-style message box's text and progress bar.
Updates a progress-style message box's text and progress bar. Only relevant on message boxes
initiated via {link Roo.MessageBoxprogress} or by calling {link Roo.MessageBoxshow} with progress: true.
|
Roo.bootstrap.MessageBox | |
Updates the message box body text
Updates the message box body text
|
Roo.bootstrap.MessageBox | |
Displays a message box with an infinitely auto-updating progress bar.
Displays a message box with an infinitely auto-updating progress bar. This can be used to block user
interaction while waiting for a long-running process to complete that does not have defined intervals. You are responsible for closing the message box when the process is complete.
|
Roo.bootstrap.MessageBox |