IndicatorElement is often mixed into other classes to generate an indicator. Indicators are small graphics that are generally used in two ways:
- To draw attention to the status of an item. For example, an indicator might be used to show that an item in a list has errors that need to be resolved.
- To clarify the function of a control that acts in an exceptional way (a button that opens a menu instead of performing an action directly, for example).
For a list of indicators included in the library, please see the OOjs UI documentation on MediaWiki.
- Source:
Methods
getIndicator() → {string}
Get the symbolic name of the indicator (e.g., ‘alert’ or ‘down’).
- Source:
Returns:
Symbolic name of indicator
- Type
- string
getIndicatorTitle() → {string}
Get the indicator title.
The title is displayed when a user moves the mouse over the indicator.
- Source:
Returns:
Indicator title text
- Type
- string
setIndicator(indicator)
Set the indicator by its symbolic name: ‘alert’, ‘down’, ‘next’, ‘previous’, ‘required’, ‘up’. Use null
to remove the indicator.
Parameters:
Name | Type | Description |
---|---|---|
indicator |
string | null | Symbolic name of indicator, or |
- Source:
setIndicatorElement($indicator)
Set the indicator element.
If an element is already set, it will be cleaned up before setting up the new element.
Parameters:
Name | Type | Description |
---|---|---|
$indicator |
jQuery | Element to use as indicator |
- Source:
setIndicatorTitle(indicatorTitle)
Set the indicator title.
The title is displayed when a user moves the mouse over the indicator.
Parameters:
Name | Type | Description |
---|---|---|
indicatorTitle |
string | function | null | Indicator title text, a function that returns text, or
|
- Source: