From mediawiki.org
< OOUI‎ | Windows
Jump to navigation Jump to search

The OOUI library contains three types of dialogs (Dialog, ProcessDialog, and MessageDialog), which render a dialog box that users can view and interact with. Each dialog is configured with the controls required—either for responding to a message or completing a process—and all configuration is handled with a common API.

Note that the Dialog (and ProcessDialog) classes themselves are not instantiated directly. By extending these classes, developers control the look and functionality of the entire window rather than injecting bits and pieces of information into it. Only MessageDialogs, which are very generic, are instantiated directly.

The Dialog class serves as the base class for the other types of dialogs. Unless extended to include controls, the rendered dialog box is a simple window that users can close by hitting the Esc key.  Every dialog provides a this.$overlay DOM element that can be used for elements (e.g., menus) that extend outside of the dialog. See OOUI/Concepts#Overlays for an example.

The following is an example of a basic Dialog window.

Example of a Dialog window .

For more information about Dialog windows, please see the code-level documentation.