mw.widgets

OOUI widgets specific to MediaWiki. Initially empty. To expand the amount of available widgets the mediawiki.widget module can be loaded.

Source:

Example

mw.loader.using('mediawiki.widget').then(() => {
  OO.ui.getWindowManager().addWindows( [ new mw.widget.AbandonEditDialog() ] );
});

Classes

APIResultsProvider
API Results Provider object.
APIResultsQueue
API Results Queue object.
AbandonEditDialog
Confirm dialog shown when the users is leaving an editor without saving.
CalendarWidget
Creates an mw.widgets.CalendarWidget object.
CategoryMultiselectWidget
Category selector widget.
CategoryTagItemWidget
Category selector tag item widget.
CheckMatrixWidget
A JavaScript version of CheckMatrixWidget.
ComplexNamespaceInputWidget
Namespace input widget.
ComplexTitleInputWidget
Like TitleInputWidget, but the namespace has to be input through a separate dropdown field.
CopyTextLayout
Extends CopyTextLayout with MediaWiki notifications.
DateInputWidget
Creates an mw.widgets.DateInputWidget object.
ExpiryWidget
Creates a mw.widgets.ExpiryWidget object.
MediaResourceProvider
MediaWiki media resource provider.
MediaResourceQueue
MediaWiki media resource queue.
MediaResultWidget
Creates an mw.widgets.MediaResultWidget object.
MediaSearchProvider
MediaWiki media search provider.
MediaSearchQueue
MediaWiki media resource queue.
MediaSearchWidget
Creates an mw.widgets.MediaSearchWidget object.
MediaUserUploadsProvider
MediaWiki media search provider.
MediaUserUploadsQueue
MediaWiki media resource queue.
NamespaceInputWidget
Namespace input widget.
NamespacesMenuOptionWidget
Creates an mw.widgets.NamespacesMenuOptionWidget object.
NamespacesMultiselectWidget
Creates an mw.widgets.NamespacesMultiselectWidget object.
RowWidget

A RowWidget is used in conjunction with table widgets and should not be instantiated by themselves.

RowWidgetModel
RowWidget model.
SearchInputWidget
Creates a mw.widgets.SearchInputWidget object.
SelectWithInputWidget
Select with input widget.
SizeFilterWidget
RadioSelectInputWidget and a TextInputWidget to set minimum or maximum byte size.
StashedFileWidget
TableWidget

A TableWidget groups row widgets together to form a bidimensional grid of text inputs.

TableWidgetModel
TableWidget model.
TagMultiselectWidget

TagMultiselectWidget can be used to input list of tags in a single line.

TitleInputWidget
Creates an mw.widgets.TitleInputWidget object.
TitleOptionWidget
Creates a mw.widgets.TitleOptionWidget object.
TitleSearchWidget
Creates an mw.widgets.TitleSearchWidget object.
TitleWidget
Mixin for title widgets.
TitlesMultiselectWidget
Creates an mw.widgets.TitlesMultiselectWidget object.
ToggleSwitchWidget

This extends ToggleSwitchWidget by adding an invisible checkbox element which will be used to submit the value.

UserInputWidget
Creates a mw.widgets.UserInputWidget object.
UsersMultiselectWidget

UsersMultiselectWidget can be used to input list of users in a single line.

Namespaces

datetime
OOUI widgets specific to MediaWiki for inputting date and time.

Methods

visibleByteLimit(textInputWidget, limitopt, filterFunctionopt)static #

Add a visible byte limit label to a TextInputWidget.

Loaded from mediawiki.widgets.visibleLengthLimit module.

Uses jQueryPlugins.byteLimit to enforce the limit.

Parameters:

Name Type Attributes Description
textInputWidget OO.ui.TextInputWidget
limit number <optional>

Byte limit, defaults to input's maxlength attribute

filterFunction function <optional>

Function to call on the string before assessing the length

Source:
Add a visible byte limit label to a TextInputWidget.

visibleByteLimitWithDropdown(textInputWidget, dropdownInputWidget, limitopt)static #

Add a visible byte limit label to a TextInputWidget, assuming that the value of the DropdownInputWidget will be added as a prefix. MediaWiki formats the comment fields for many actions that way, e.g. for page deletion.

Loaded from mediawiki.widgets.visibleLengthLimit module.

Uses jQueryPlugins.byteLimit to enforce the limit.

Parameters:

Name Type Attributes Description
textInputWidget OO.ui.TextInputWidget
dropdownInputWidget OO.ui.DropdownInputWidget
limit number <optional>

Code point limit, defaults to input's maxlength attribute

Source:

Add a visible byte limit label to a TextInputWidget, assuming that the value of the DropdownInputWidget will be added as a prefix.

visibleCodePointLimit(textInputWidget, limitopt, filterFunctionopt)static #

Add a visible codepoint (character) limit label to a TextInputWidget.

Loaded from mediawiki.widgets.visibleLengthLimit module.

Uses jQueryPlugins.codePointLimit to enforce the limit.

Parameters:

Name Type Attributes Description
textInputWidget OO.ui.TextInputWidget
limit number <optional>

Code point limit, defaults to input's maxlength attribute

filterFunction function <optional>

Function to call on the string before assessing the length

Source:
Add a visible codepoint (character) limit label to a TextInputWidget.

visibleCodePointLimitWithDropdown(textInputWidget, dropdownInputWidget, limitopt)static #

Add a visible codepoint (character) limit label to a TextInputWidget, assuming that the value of the DropdownInputWidget will be added as a prefix. MediaWiki formats the comment fields for many actions that way, e.g. for page deletion.

Loaded from mediawiki.widgets.visibleLengthLimit module.

Uses jQueryPlugins.codePointLimit to enforce the limit.

Parameters:

Name Type Attributes Description
textInputWidget OO.ui.TextInputWidget
dropdownInputWidget OO.ui.DropdownInputWidget
limit number <optional>

Code point limit, defaults to input's maxlength attribute

Source:

Add a visible codepoint (character) limit label to a TextInputWidget, assuming that the value of the DropdownInputWidget will be added as a prefix.