Dialogs inspired by TES III: Morrowind. Long live House Telvanni.
Members
-
static window.DIALOG_ID :number
-
The global ID of onscreen dialogs. Starts at 0.
Methods
-
inner alert(text, isHTMLopt, closeCallbackopt) → {jQuery}
-
Creates an alert dialog with default settings. This function is a simplified wrapper around
window.dialog
. It provides a quick way to create basic alert dialogs with optional HTML content and a close callback.Parameters:
Name Type Attributes Default Description text
string The text or HTML content to display in the alert dialog.
isHTML
boolean <optional>
false Specifies whether the
text
parameter should be treated as HTML. Iftrue
, thetext
will be inserted as HTML, otherwise as plain text.closeCallback
function <optional>
A callback function to be executed when the alert dialog is closed.
Returns:
jQuery -The jQuery object representing the created alert dialog.
-
inner dialog(options) → {jQuery}
-
Creates a dialog and puts it onscreen with various options and callbacks.
Parameters:
Name Type Description options
Object Configuration options for the dialog.
Properties
Name Type Attributes Default Description text
string | HTMLElement <optional>
The text or HTML to display in the dialog. Text is auto-converted to HTML.
title
string <optional>
The dialog's title.
modal
boolean <optional>
false Whether to open a modal dialog. Implies draggable=false; dialogClass='ui-dialog-modal'. Note that modal dialogs hijack the entire screen and should only be used in specific cases. If IITC is running on mobile, modal will always be true.
id
string <optional>
A unique ID for this dialog. If a dialog with this ID is already open, it will be automatically closed.
closeCallback
function <optional>
A callback to run on close.
collapseCallback
function <optional>
A callback to run on dialog collapse.
expandCallback
function <optional>
A callback to run on dialog expansion.
collapseExpandCallback
function <optional>
A callback to run on both collapse and expand. Overrides collapseCallback and expandCallback. Receives a boolean argument
collapsing
.focusCallback
function <optional>
A callback to run when the dialog gains focus.
blurCallback
function <optional>
A callback to run when the dialog loses focus.
Returns:
jQuery -The jQuery object representing the created dialog.
- See:
-
- http://docs.jquery.com/UI/API/1.8/Dialog for a list of all jQuery UI Dialog options. If you previously applied a class to your dialog after creating it with alert(), dialogClass may be particularly useful.