Extends
Constructor
new ve.ui.MWTransclusionOutlinePartWidget(part, config)abstract
#
Hierarchy
Children
Common base class for top-level items (a.k.a. "parts") in the template editor sidebar. Subclasses
should exist for all subclasses of ve.dm.MWTransclusionPartModel:
This is inspired by and meant to replace OO.ui.DecoratedOptionWidget in the context of the
template dialog. Also see OO.ui.ButtonWidget for inspiration.
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
part |
ve.dm.MWTransclusionPartModel | |||||||||||||||||||||||||||||||
config |
Object |
Properties:
|
Methods
isSelected() → {boolean}
#
OO.ui.OptionWidget, but this isn't one.
onHeaderKeyPressed(key)private
#
Parameters:
| Name | Type | Description |
|---|---|---|
key |
number |
Fires:
setSelected(state)
#
Convenience method, modelled after OO.ui.OptionWidget, but this isn't one.
Parameters:
| Name | Type | Description |
|---|---|---|
state |
boolean |
OO.ui.OptionWidget, but this isn't one.
updateButtonAriaDescription(state)private
#
Parameters:
| Name | Type | Description |
|---|---|---|
state |
boolean |
Events
transclusionOutlineItemSelected(pageName, [soft])
#
Triggered when the user interacts with any sidebar element in a meaningful way, and that should be reflected in the content pane of the dialog. This includes e.g. selecting something that was already selected.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
pageName |
string | Unique id of the |
|
soft |
boolean |
optional |
If true, focus should stay in the sidebar. Defaults to false. |
Triggered when the user interacts with any sidebar element in a meaningful way, and that should be reflected in the content pane of the dialog.
transclusionPartSoftSelected(partId)
#
"Soft" selection with space.
Parameters:
| Name | Type | Description |
|---|---|---|
partId |
string | Unique id of the |