Expand all

ve.ui.MWLanguagesPage

Extends

Constructor

new ve.ui.MWLanguagesPage(name, [config]) #

MediaWiki meta dialog Languages page.

Parameters:

Name Type Attributes Description
name string

Unique symbolic name of page

config Object optional

Configuration options

Properties:
Name Type Attributes Description
$overlay jQuery optional

Overlay to render dropdowns in

Source:
MediaWiki meta dialog Languages page.

Methods

getAllLanguageItems() → {jQuery.Promise} #

Get array of language items from meta list

Returns:

Type
jQuery.Promise
Source:
Get array of language items from meta list

getFieldsets() → {Array.<OO.ui.FieldsetLayout>} #

Get the fieldsets whose widgets the dialog watches for changes.

Returns:

Fieldsets

Type
Array.<OO.ui.FieldsetLayout>
Overrides:
Source:
Get the fieldsets whose widgets the dialog watches for changes.

isValid() → {boolean|jQuery.Promise} #

Check whether the page's settings are valid.

Returns:

Whether the settings are valid, or a promise resolving to that

Type
boolean | jQuery.Promise
Inherited from:
Source:
Check whether the page's settings are valid.

onAllLanguageItemsError() #

Handle language items failing to be loaded.

TODO: This error function should probably not be empty.

Source:
Handle language items failing to be loaded.

onAllLanguageItemsSuccess(response) → {Array} #

Handle language items being loaded.

Parameters:

Name Type Description
response Object

API response

Returns:

Type
Array
Source:
Handle language items being loaded.

setup(fragment, config) → {jQuery.Promise} #

Set up the page.

Parameters:

Name Type Description
fragment ve.dm.SurfaceFragment

Surface fragment

config Object
Properties:
Name Type Attributes Default Description
data Object optional

Dialog setup data

isReadOnly boolean optional
false

Dialog is in read-only mode

Returns:

Type
jQuery.Promise
Inherited from:
Source:
Set up the page.

teardown([data]) #

Tear down the page, applying or discarding changes per the action that closed the dialog.

Parameters:

Name Type Attributes Description
data Object optional

Dialog tear down data

Properties:
Name Type Attributes Description
action string optional

Action that closed the dialog

Inherited from:
Source:
Tear down the page, applying or discarding changes per the action that closed the dialog.