Extends
Constructor
new ve.ui.MWTransclusionOutlineWidget()
#
Container for the entire transclusion dialog sidebar, may contain a single or multiple templates or raw wikitext snippets.
Properties:
Name | Type | Description |
---|---|---|
partWidgets |
Object.<string, ve.ui.MWTransclusionOutlinePartWidget> | Map of top-level items currently visible in this container, indexed by part id |
Container for the entire transclusion dialog sidebar, may contain a single or multiple templates or raw wikitext snippets.
Methods
addPartWidget(part, [newPosition], [removed])private
#
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
part |
ve.dm.MWTransclusionPartModel | ||
newPosition |
number |
optional |
|
removed |
ve.dm.MWTransclusionPartModel
|
null
|
optional |
Fires:
clear()
#
Removes all {@see ve.ui.MWTransclusionOutlinePartWidget}, i.e. empties the list.
findPartIdContainingElement(element) → {string|undefined
}
#
undefined
}
#
Checks if the provided DOM element belongs to the DOM structure of one of the top-level {@see ve.ui.MWTransclusionOutlinePartWidget}s, and returns its id. Useful for e.g. mouse click or keyboard handlers.
Parameters:
Name | Type | Description |
---|---|---|
element |
HTMLElement |
Returns:
Always a top-level part id, e.g. "part_0"
- Type
-
string
|
undefined
Checks if the provided DOM element belongs to the DOM structure of one of the top-level {@see ve.ui.MWTransclusionOutlinePartWidget}s, and returns its id.
onFilterParametersByName(visibility)private
#
onReplacePart(removed, added, [newPosition])
#
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
removed |
ve.dm.MWTransclusionPartModel
|
null
|
Removed part |
|
added |
ve.dm.MWTransclusionPartModel
|
null
|
Added part |
|
newPosition |
number |
optional |
onTransclusionPartSoftSelected(pageName)
#
Handle spacebar in a part header
Parameters:
Name | Type | Description |
---|---|---|
pageName |
string |
Fires:
removePartWidget(part)private
#
Parameters:
Name | Type | Description |
---|---|---|
part |
ve.dm.MWTransclusionPartModel |
setSelectionByPageName([pageName])
#
This is inspired by {@see OO.ui.SelectWidget.selectItem}, but isn't one.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
pageName |
string |
optional |
Symbolic name of page. Omit to remove current selection. |
toggleHasValueByPageName(pageName, hasValue)
#
Parameters:
Name | Type | Description |
---|---|---|
pageName |
string | |
hasValue |
boolean |
Events
filterPagesByName(visibility)
#
Parameters:
Name | Type | Description |
---|---|---|
visibility |
Object.<string, boolean> | Keyed by unique id of the {@see OO.ui.BookletLayout} page, e.g. something like "part_1/param1". |