Expand all

ve.ui.MWCategoriesPage

Extends

Constructor

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

MediaWiki meta dialog categories 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 categories page.

Methods

getCategoryItemForInsertion(item, [oldData]) → {Object} #

Get metaList like object to insert from item

Parameters:

Name Type Attributes Description
item Object

category widget item

oldData Object optional

Metadata object that was previously associated with this item, if any

Source:

Returns:

metaBase

Type
Object
Get metaList like object to insert from item

getCategoryItemFromMetaListItem(metaItem) → {Object} #

Gets category item from meta list item

Parameters:

Name Type Description
metaItem ve.dm.MWCategoryMetaItem
Source:

Returns:

item

Type
Object
Gets category item from meta list item

getCategoryItems() → {Array.<Object>} #

Get array of category items from meta list

Source:

Returns:

items

Type
Array.<Object>
Get array of category items from meta list

getDefaultSortKeyItem() → {Object} #

Get default sort key item.

Source:

Returns:

Default sort key item

Type
Object
Get default sort key item.

onDefaultSortChange(value) #

Handle category default sort change events.

Parameters:

Name Type Description
value string

Default sort value

Source:
Handle category default sort change events.

onMetaListInsert(metaItem) #

Bound to MetaList insert event for adding meta dialog components.

Parameters:

Name Type Description
metaItem ve.dm.MetaItem
Source:
Bound to MetaList insert event for adding meta dialog components.

onMetaListRemove(metaItem) #

Bound to MetaList insert event for removing meta dialog components.

Parameters:

Name Type Description
metaItem ve.dm.MetaItem
Source:
Bound to MetaList insert event for removing meta dialog components.

onNewCategory(item, [beforeMetaItem]) #

Inserts new category into meta list

Parameters:

Name Type Attributes Description
item Object
beforeMetaItem ve.dm.MWCategoryMetaItem optional

Meta item to insert before, or undefined to go at the end

Source:
Inserts new category into meta list

onUpdateSortKey(item) #

Removes and re-inserts updated category widget item

Parameters:

Name Type Description
item Object
Source:
Removes and re-inserts updated category widget item

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

Setup categories 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

Source:

Returns:

Type
jQuery.Promise
Setup categories page.

setupOutlineItem() #

teardown([data]) #

Tear down the page. This is called when the MWMetaDialog is torn down.

Parameters:

Name Type Attributes Description
data Object optional

Dialog tear down data

Source:
Tear down the page.