Global

Methods

getCommunityConfiguration() → {Promise}

Get the community configuration for the featured templates.

Source:
Returns:
Type
Promise

getTemplateData(templates) → {Promise}

Get the template data for a given set of templates.

Parameters:
Name Type Description
templates Array

Template titles.

Source:
Returns:
Type
Promise

onDialogApply(templateData)

Respond to edit dialog apply event

Parameters:
Name Type Description
templateData Object

New templatedata

Source:

onEditOpenDialogButton()

Respond to edit dialog button click.

Source:

openEditDialog(dataModel)

Open the templatedata edit dialog

Parameters:
Name Type Description
dataModel Model

The data model associated with this edit dialog.

Source:

parsePageId(pageId) → {number}

Parse a page ID to a number, or throw an error

Parameters:
Name Type Description
pageId string
Source:
Throws:

If the pageId is not a number

Type
Error
Returns:

The parsed page ID

Type
number

replaceTemplateData(newTemplateData)

Replace the old templatedata string with the new one, or insert the new one into the page if an old one doesn't exist

Parameters:
Name Type Description
newTemplateData Object

New templatedata

Source:

setNoticeMessage(label, type)

Display error message in the edit window

Parameters:
Name Type Description
label jQuery | string | OO.ui.HtmlSnippet | function | null

Message to display

type string

Message type 'notice', 'error', 'warning' or 'success'

Source:

Events

add-param

Parameters:
Name Type Description
key string

Parameter key

data Object

Parameter data

Source:

add-paramOrder

Parameters:
Name Type Description
key string

Parameter key

Source:

added

When favorite is added

Parameters:
Name Type Description
pageId number
Source:

change

Source:

change-description

Parameters:
Name Type Attributes Description
description string

New template description

language Object <optional>

Description language, if supplied

Source:

change-format

Parameters:
Name Type Attributes Default Description
format string | null <optional>
null

Preferred format

Source:

change-map

Parameters:
Name Type Description
map Object | undefined

New template map info

Source:

change-paramOrder

Parameters:
Name Type Description
orderArray Array.<string>

Parameter key array in order

Source:

change-property

Parameters:
Name Type Description
paramKey string

Parameter key

prop string

Property name

value Mixed
language string
Source:

choose

When a template is chosen from the list of favorites.

Parameters:
Name Type Description
The Object

template data of the chosen template.

Source:

choose

When a template is choosen from the menu.

Parameters:
Name Type Description
The Object

template data of the chosen template.

Source:

choose

When a template is chosen from the list of favorites.

Parameters:
Name Type Description
The Object

template data of the chosen template.

Source:

choose

When a template is chosen.

Parameters:
Name Type Description
The Object

template data of the chosen template.

Source:

choose

When a template is choosen by searching or other means.

Parameters:
Name Type Description
The Object

template data of the chosen template.

Source:

choose

When a template is chosen from the list of favorites.

Parameters:
Name Type Description
The Object

template data of the chosen template.

Source:

choose

When a template is chosen.

Parameters:
Name Type Description
The Object

template data of the chosen template.

Source:

choose

When a template is chosen.

Parameters:
Name Type Description
The Object

template data of the chosen template.

Source:

choose

Parameters:
Name Type Description
languageResultWidget LanguageResultWidget
Source:

choose

Parameters:
Name Type Description
paramWidget ParamWidget
Source:

delete-param

Parameters:
Name Type Description
paramKey string

Parameter key

Source:

drop

aa

Parameters:
Name Type Description
The Object

template data of the chosen template.

Source:

loadmore

When a "load more" item is clicked.

Parameters:
Name Type Description
column Column
cmcontinue string
Source:

match

When the current value of the search input matches a search result (regardless of whether that result is highlighted).

Parameters:
Name Type Description
templateData Object

Template data of the matched search result.

Source:

removed

When favorite is removed

Parameters:
Name Type Description
pageId number
Source:

select

When an item in this column is selected.

Parameters:
Name Type Description
column Column
columnItem ColumnItem
Source:

select

When the item is selected.

Parameters:
Name Type Description
The Object

template data of the chosen template.

Source: