Expand all

ve.ui.MWParameterPage

Extends

Constructor

new ve.ui.MWParameterPage(parameter, [config]) #

Container for editing the value of a parameter in the template dialog content pane. Includes a dynamic value input depending on the parameter's type documented in TemplateData.

Parameters:

Name Type Attributes Description
parameter ve.dm.MWParameterModel

Template parameter

config Object optional

Configuration options

Properties:
Name Type Attributes Description
$overlay jQuery optional

Overlay to render dropdowns in

readOnly boolean optional

Parameter is read-only

Source:

Container for editing the value of a parameter in the template dialog content pane.

Methods

containsSomeValue() → {boolean}private #

Source:

Returns:

True if there is either user-provided input or a default value

Type
boolean

createValueInput() → {OO.ui.InputWidget}private #

Create a value input widget based on the parameter type and whether it is required or not.

Source:

Returns:

Type
OO.ui.InputWidget

Create a value input widget based on the parameter type and whether it is required or not.

getDefaultInputConfig() → {Object}private #

Get default configuration for an input widget.

Source:

Returns:

Type
Object
Get default configuration for an input widget.

isSuggestedValueType(type) → {boolean}private #

Whether or not to show suggested values for a given parameter type

Parameters:

Name Type Description
type string

Parameter type

Source:

Returns:

True if suggested values should be shown

Type
boolean
Whether or not to show suggested values for a given parameter type

onValueInputChange(value)private #

Handle change events from the value input

Parameters:

Name Type Description
value string
Source:
Handle change events from the value input

updateSize() #

Refresh collapsible children.

Source:
Refresh collapsible children.

Events

hasValueChange(string, boolean) #

Triggered when the parameter value changes between empty and not empty.

Parameters:

Name Type Description
string

parameterId Keyed by unique id of the parameter, e.g. something like "part_1/param1".

boolean

hasValue

Source:
Triggered when the parameter value changes between empty and not empty.